Left Termination of the query pattern prime(b) w.r.t. the given Prolog program could successfully be proven:



PROLOG
  ↳ PrologToPiTRSProof

div3(X, Y, Z) :- quot4(X, Y, Y, Z).
quot4(00, s1(Y), s1(Z), 00).
quot4(s1(X), s1(Y), Z, U) :- quot4(X, Y, Z, U).
quot4(X, 00, s1(Z), s1(U)) :- quot4(X, s1(Z), s1(Z), U).
prime1(s12 (X)) :- pr2(s12 (X), s1(X)).
pr2(X, s1(00)).
pr2(X, s12 (Y)) :- notdivides2(s12 (Y), X), pr2(X, s1(Y)).
notdivides2(Y, X) :- div3(X, Y, U), times3(U, Y, Z), neq2(X, Z).
neq2(s1(X), 00).
neq2(00, s1(X)).
neq2(s1(X), s1(Y)) :- neq2(X, Y).
times3(00, Y, 00).
times3(s1(X), Y, Z) :- times3(X, Y, U), add3(U, Y, Z).
add3(X, 00, X).
add3(00, X, X).
add3(s1(X), Y, s1(Z)) :- add3(X, Y, Z).


With regard to the inferred argument filtering the predicates were used in the following modes:
prime1: (b)
pr2: (b,b)
not_divides2: (b,b)
div3: (b,b,f)
quot4: (b,b,b,f)
times3: (b,b,f)
add3: (b,b,f)
neq2: (b,b)
Transforming PROLOG into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:


prime_1_in_g1(s_11(s_11(X))) -> if_prime_1_in_1_g2(X, pr_2_in_gg2(s_11(s_11(X)), s_11(X)))
pr_2_in_gg2(X, s_11(0_0)) -> pr_2_out_gg2(X, s_11(0_0))
pr_2_in_gg2(X, s_11(s_11(Y))) -> if_pr_2_in_1_gg3(X, Y, not_divides_2_in_gg2(s_11(s_11(Y)), X))
not_divides_2_in_gg2(Y, X) -> if_not_divides_2_in_1_gg3(Y, X, div_3_in_gga3(X, Y, U))
div_3_in_gga3(X, Y, Z) -> if_div_3_in_1_gga4(X, Y, Z, quot_4_in_ggga4(X, Y, Y, Z))
quot_4_in_ggga4(0_0, s_11(Y), s_11(Z), 0_0) -> quot_4_out_ggga4(0_0, s_11(Y), s_11(Z), 0_0)
quot_4_in_ggga4(s_11(X), s_11(Y), Z, U) -> if_quot_4_in_1_ggga5(X, Y, Z, U, quot_4_in_ggga4(X, Y, Z, U))
quot_4_in_ggga4(X, 0_0, s_11(Z), s_11(U)) -> if_quot_4_in_2_ggga4(X, Z, U, quot_4_in_ggga4(X, s_11(Z), s_11(Z), U))
if_quot_4_in_2_ggga4(X, Z, U, quot_4_out_ggga4(X, s_11(Z), s_11(Z), U)) -> quot_4_out_ggga4(X, 0_0, s_11(Z), s_11(U))
if_quot_4_in_1_ggga5(X, Y, Z, U, quot_4_out_ggga4(X, Y, Z, U)) -> quot_4_out_ggga4(s_11(X), s_11(Y), Z, U)
if_div_3_in_1_gga4(X, Y, Z, quot_4_out_ggga4(X, Y, Y, Z)) -> div_3_out_gga3(X, Y, Z)
if_not_divides_2_in_1_gg3(Y, X, div_3_out_gga3(X, Y, U)) -> if_not_divides_2_in_2_gg4(Y, X, U, times_3_in_gga3(U, Y, Z))
times_3_in_gga3(0_0, Y, 0_0) -> times_3_out_gga3(0_0, Y, 0_0)
times_3_in_gga3(s_11(X), Y, Z) -> if_times_3_in_1_gga4(X, Y, Z, times_3_in_gga3(X, Y, U))
if_times_3_in_1_gga4(X, Y, Z, times_3_out_gga3(X, Y, U)) -> if_times_3_in_2_gga5(X, Y, Z, U, add_3_in_gga3(U, Y, Z))
add_3_in_gga3(X, 0_0, X) -> add_3_out_gga3(X, 0_0, X)
add_3_in_gga3(0_0, X, X) -> add_3_out_gga3(0_0, X, X)
add_3_in_gga3(s_11(X), Y, s_11(Z)) -> if_add_3_in_1_gga4(X, Y, Z, add_3_in_gga3(X, Y, Z))
if_add_3_in_1_gga4(X, Y, Z, add_3_out_gga3(X, Y, Z)) -> add_3_out_gga3(s_11(X), Y, s_11(Z))
if_times_3_in_2_gga5(X, Y, Z, U, add_3_out_gga3(U, Y, Z)) -> times_3_out_gga3(s_11(X), Y, Z)
if_not_divides_2_in_2_gg4(Y, X, U, times_3_out_gga3(U, Y, Z)) -> if_not_divides_2_in_3_gg4(Y, X, Z, neq_2_in_gg2(X, Z))
neq_2_in_gg2(s_11(X), 0_0) -> neq_2_out_gg2(s_11(X), 0_0)
neq_2_in_gg2(0_0, s_11(X)) -> neq_2_out_gg2(0_0, s_11(X))
neq_2_in_gg2(s_11(X), s_11(Y)) -> if_neq_2_in_1_gg3(X, Y, neq_2_in_gg2(X, Y))
if_neq_2_in_1_gg3(X, Y, neq_2_out_gg2(X, Y)) -> neq_2_out_gg2(s_11(X), s_11(Y))
if_not_divides_2_in_3_gg4(Y, X, Z, neq_2_out_gg2(X, Z)) -> not_divides_2_out_gg2(Y, X)
if_pr_2_in_1_gg3(X, Y, not_divides_2_out_gg2(s_11(s_11(Y)), X)) -> if_pr_2_in_2_gg3(X, Y, pr_2_in_gg2(X, s_11(Y)))
if_pr_2_in_2_gg3(X, Y, pr_2_out_gg2(X, s_11(Y))) -> pr_2_out_gg2(X, s_11(s_11(Y)))
if_prime_1_in_1_g2(X, pr_2_out_gg2(s_11(s_11(X)), s_11(X))) -> prime_1_out_g1(s_11(s_11(X)))

The argument filtering Pi contains the following mapping:
prime_1_in_g1(x1)  =  prime_1_in_g1(x1)
0_0  =  0_0
s_11(x1)  =  s_11(x1)
if_prime_1_in_1_g2(x1, x2)  =  if_prime_1_in_1_g1(x2)
pr_2_in_gg2(x1, x2)  =  pr_2_in_gg2(x1, x2)
pr_2_out_gg2(x1, x2)  =  pr_2_out_gg
if_pr_2_in_1_gg3(x1, x2, x3)  =  if_pr_2_in_1_gg3(x1, x2, x3)
not_divides_2_in_gg2(x1, x2)  =  not_divides_2_in_gg2(x1, x2)
if_not_divides_2_in_1_gg3(x1, x2, x3)  =  if_not_divides_2_in_1_gg3(x1, x2, x3)
div_3_in_gga3(x1, x2, x3)  =  div_3_in_gga2(x1, x2)
if_div_3_in_1_gga4(x1, x2, x3, x4)  =  if_div_3_in_1_gga1(x4)
quot_4_in_ggga4(x1, x2, x3, x4)  =  quot_4_in_ggga3(x1, x2, x3)
quot_4_out_ggga4(x1, x2, x3, x4)  =  quot_4_out_ggga1(x4)
if_quot_4_in_1_ggga5(x1, x2, x3, x4, x5)  =  if_quot_4_in_1_ggga1(x5)
if_quot_4_in_2_ggga4(x1, x2, x3, x4)  =  if_quot_4_in_2_ggga1(x4)
div_3_out_gga3(x1, x2, x3)  =  div_3_out_gga1(x3)
if_not_divides_2_in_2_gg4(x1, x2, x3, x4)  =  if_not_divides_2_in_2_gg2(x2, x4)
times_3_in_gga3(x1, x2, x3)  =  times_3_in_gga2(x1, x2)
times_3_out_gga3(x1, x2, x3)  =  times_3_out_gga1(x3)
if_times_3_in_1_gga4(x1, x2, x3, x4)  =  if_times_3_in_1_gga2(x2, x4)
if_times_3_in_2_gga5(x1, x2, x3, x4, x5)  =  if_times_3_in_2_gga1(x5)
add_3_in_gga3(x1, x2, x3)  =  add_3_in_gga2(x1, x2)
add_3_out_gga3(x1, x2, x3)  =  add_3_out_gga1(x3)
if_add_3_in_1_gga4(x1, x2, x3, x4)  =  if_add_3_in_1_gga1(x4)
if_not_divides_2_in_3_gg4(x1, x2, x3, x4)  =  if_not_divides_2_in_3_gg1(x4)
neq_2_in_gg2(x1, x2)  =  neq_2_in_gg2(x1, x2)
neq_2_out_gg2(x1, x2)  =  neq_2_out_gg
if_neq_2_in_1_gg3(x1, x2, x3)  =  if_neq_2_in_1_gg1(x3)
not_divides_2_out_gg2(x1, x2)  =  not_divides_2_out_gg
if_pr_2_in_2_gg3(x1, x2, x3)  =  if_pr_2_in_2_gg1(x3)
prime_1_out_g1(x1)  =  prime_1_out_g

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of PROLOG



↳ PROLOG
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

prime_1_in_g1(s_11(s_11(X))) -> if_prime_1_in_1_g2(X, pr_2_in_gg2(s_11(s_11(X)), s_11(X)))
pr_2_in_gg2(X, s_11(0_0)) -> pr_2_out_gg2(X, s_11(0_0))
pr_2_in_gg2(X, s_11(s_11(Y))) -> if_pr_2_in_1_gg3(X, Y, not_divides_2_in_gg2(s_11(s_11(Y)), X))
not_divides_2_in_gg2(Y, X) -> if_not_divides_2_in_1_gg3(Y, X, div_3_in_gga3(X, Y, U))
div_3_in_gga3(X, Y, Z) -> if_div_3_in_1_gga4(X, Y, Z, quot_4_in_ggga4(X, Y, Y, Z))
quot_4_in_ggga4(0_0, s_11(Y), s_11(Z), 0_0) -> quot_4_out_ggga4(0_0, s_11(Y), s_11(Z), 0_0)
quot_4_in_ggga4(s_11(X), s_11(Y), Z, U) -> if_quot_4_in_1_ggga5(X, Y, Z, U, quot_4_in_ggga4(X, Y, Z, U))
quot_4_in_ggga4(X, 0_0, s_11(Z), s_11(U)) -> if_quot_4_in_2_ggga4(X, Z, U, quot_4_in_ggga4(X, s_11(Z), s_11(Z), U))
if_quot_4_in_2_ggga4(X, Z, U, quot_4_out_ggga4(X, s_11(Z), s_11(Z), U)) -> quot_4_out_ggga4(X, 0_0, s_11(Z), s_11(U))
if_quot_4_in_1_ggga5(X, Y, Z, U, quot_4_out_ggga4(X, Y, Z, U)) -> quot_4_out_ggga4(s_11(X), s_11(Y), Z, U)
if_div_3_in_1_gga4(X, Y, Z, quot_4_out_ggga4(X, Y, Y, Z)) -> div_3_out_gga3(X, Y, Z)
if_not_divides_2_in_1_gg3(Y, X, div_3_out_gga3(X, Y, U)) -> if_not_divides_2_in_2_gg4(Y, X, U, times_3_in_gga3(U, Y, Z))
times_3_in_gga3(0_0, Y, 0_0) -> times_3_out_gga3(0_0, Y, 0_0)
times_3_in_gga3(s_11(X), Y, Z) -> if_times_3_in_1_gga4(X, Y, Z, times_3_in_gga3(X, Y, U))
if_times_3_in_1_gga4(X, Y, Z, times_3_out_gga3(X, Y, U)) -> if_times_3_in_2_gga5(X, Y, Z, U, add_3_in_gga3(U, Y, Z))
add_3_in_gga3(X, 0_0, X) -> add_3_out_gga3(X, 0_0, X)
add_3_in_gga3(0_0, X, X) -> add_3_out_gga3(0_0, X, X)
add_3_in_gga3(s_11(X), Y, s_11(Z)) -> if_add_3_in_1_gga4(X, Y, Z, add_3_in_gga3(X, Y, Z))
if_add_3_in_1_gga4(X, Y, Z, add_3_out_gga3(X, Y, Z)) -> add_3_out_gga3(s_11(X), Y, s_11(Z))
if_times_3_in_2_gga5(X, Y, Z, U, add_3_out_gga3(U, Y, Z)) -> times_3_out_gga3(s_11(X), Y, Z)
if_not_divides_2_in_2_gg4(Y, X, U, times_3_out_gga3(U, Y, Z)) -> if_not_divides_2_in_3_gg4(Y, X, Z, neq_2_in_gg2(X, Z))
neq_2_in_gg2(s_11(X), 0_0) -> neq_2_out_gg2(s_11(X), 0_0)
neq_2_in_gg2(0_0, s_11(X)) -> neq_2_out_gg2(0_0, s_11(X))
neq_2_in_gg2(s_11(X), s_11(Y)) -> if_neq_2_in_1_gg3(X, Y, neq_2_in_gg2(X, Y))
if_neq_2_in_1_gg3(X, Y, neq_2_out_gg2(X, Y)) -> neq_2_out_gg2(s_11(X), s_11(Y))
if_not_divides_2_in_3_gg4(Y, X, Z, neq_2_out_gg2(X, Z)) -> not_divides_2_out_gg2(Y, X)
if_pr_2_in_1_gg3(X, Y, not_divides_2_out_gg2(s_11(s_11(Y)), X)) -> if_pr_2_in_2_gg3(X, Y, pr_2_in_gg2(X, s_11(Y)))
if_pr_2_in_2_gg3(X, Y, pr_2_out_gg2(X, s_11(Y))) -> pr_2_out_gg2(X, s_11(s_11(Y)))
if_prime_1_in_1_g2(X, pr_2_out_gg2(s_11(s_11(X)), s_11(X))) -> prime_1_out_g1(s_11(s_11(X)))

The argument filtering Pi contains the following mapping:
prime_1_in_g1(x1)  =  prime_1_in_g1(x1)
0_0  =  0_0
s_11(x1)  =  s_11(x1)
if_prime_1_in_1_g2(x1, x2)  =  if_prime_1_in_1_g1(x2)
pr_2_in_gg2(x1, x2)  =  pr_2_in_gg2(x1, x2)
pr_2_out_gg2(x1, x2)  =  pr_2_out_gg
if_pr_2_in_1_gg3(x1, x2, x3)  =  if_pr_2_in_1_gg3(x1, x2, x3)
not_divides_2_in_gg2(x1, x2)  =  not_divides_2_in_gg2(x1, x2)
if_not_divides_2_in_1_gg3(x1, x2, x3)  =  if_not_divides_2_in_1_gg3(x1, x2, x3)
div_3_in_gga3(x1, x2, x3)  =  div_3_in_gga2(x1, x2)
if_div_3_in_1_gga4(x1, x2, x3, x4)  =  if_div_3_in_1_gga1(x4)
quot_4_in_ggga4(x1, x2, x3, x4)  =  quot_4_in_ggga3(x1, x2, x3)
quot_4_out_ggga4(x1, x2, x3, x4)  =  quot_4_out_ggga1(x4)
if_quot_4_in_1_ggga5(x1, x2, x3, x4, x5)  =  if_quot_4_in_1_ggga1(x5)
if_quot_4_in_2_ggga4(x1, x2, x3, x4)  =  if_quot_4_in_2_ggga1(x4)
div_3_out_gga3(x1, x2, x3)  =  div_3_out_gga1(x3)
if_not_divides_2_in_2_gg4(x1, x2, x3, x4)  =  if_not_divides_2_in_2_gg2(x2, x4)
times_3_in_gga3(x1, x2, x3)  =  times_3_in_gga2(x1, x2)
times_3_out_gga3(x1, x2, x3)  =  times_3_out_gga1(x3)
if_times_3_in_1_gga4(x1, x2, x3, x4)  =  if_times_3_in_1_gga2(x2, x4)
if_times_3_in_2_gga5(x1, x2, x3, x4, x5)  =  if_times_3_in_2_gga1(x5)
add_3_in_gga3(x1, x2, x3)  =  add_3_in_gga2(x1, x2)
add_3_out_gga3(x1, x2, x3)  =  add_3_out_gga1(x3)
if_add_3_in_1_gga4(x1, x2, x3, x4)  =  if_add_3_in_1_gga1(x4)
if_not_divides_2_in_3_gg4(x1, x2, x3, x4)  =  if_not_divides_2_in_3_gg1(x4)
neq_2_in_gg2(x1, x2)  =  neq_2_in_gg2(x1, x2)
neq_2_out_gg2(x1, x2)  =  neq_2_out_gg
if_neq_2_in_1_gg3(x1, x2, x3)  =  if_neq_2_in_1_gg1(x3)
not_divides_2_out_gg2(x1, x2)  =  not_divides_2_out_gg
if_pr_2_in_2_gg3(x1, x2, x3)  =  if_pr_2_in_2_gg1(x3)
prime_1_out_g1(x1)  =  prime_1_out_g


Pi DP problem:
The TRS P consists of the following rules:

PRIME_1_IN_G1(s_11(s_11(X))) -> IF_PRIME_1_IN_1_G2(X, pr_2_in_gg2(s_11(s_11(X)), s_11(X)))
PRIME_1_IN_G1(s_11(s_11(X))) -> PR_2_IN_GG2(s_11(s_11(X)), s_11(X))
PR_2_IN_GG2(X, s_11(s_11(Y))) -> IF_PR_2_IN_1_GG3(X, Y, not_divides_2_in_gg2(s_11(s_11(Y)), X))
PR_2_IN_GG2(X, s_11(s_11(Y))) -> NOT_DIVIDES_2_IN_GG2(s_11(s_11(Y)), X)
NOT_DIVIDES_2_IN_GG2(Y, X) -> IF_NOT_DIVIDES_2_IN_1_GG3(Y, X, div_3_in_gga3(X, Y, U))
NOT_DIVIDES_2_IN_GG2(Y, X) -> DIV_3_IN_GGA3(X, Y, U)
DIV_3_IN_GGA3(X, Y, Z) -> IF_DIV_3_IN_1_GGA4(X, Y, Z, quot_4_in_ggga4(X, Y, Y, Z))
DIV_3_IN_GGA3(X, Y, Z) -> QUOT_4_IN_GGGA4(X, Y, Y, Z)
QUOT_4_IN_GGGA4(s_11(X), s_11(Y), Z, U) -> IF_QUOT_4_IN_1_GGGA5(X, Y, Z, U, quot_4_in_ggga4(X, Y, Z, U))
QUOT_4_IN_GGGA4(s_11(X), s_11(Y), Z, U) -> QUOT_4_IN_GGGA4(X, Y, Z, U)
QUOT_4_IN_GGGA4(X, 0_0, s_11(Z), s_11(U)) -> IF_QUOT_4_IN_2_GGGA4(X, Z, U, quot_4_in_ggga4(X, s_11(Z), s_11(Z), U))
QUOT_4_IN_GGGA4(X, 0_0, s_11(Z), s_11(U)) -> QUOT_4_IN_GGGA4(X, s_11(Z), s_11(Z), U)
IF_NOT_DIVIDES_2_IN_1_GG3(Y, X, div_3_out_gga3(X, Y, U)) -> IF_NOT_DIVIDES_2_IN_2_GG4(Y, X, U, times_3_in_gga3(U, Y, Z))
IF_NOT_DIVIDES_2_IN_1_GG3(Y, X, div_3_out_gga3(X, Y, U)) -> TIMES_3_IN_GGA3(U, Y, Z)
TIMES_3_IN_GGA3(s_11(X), Y, Z) -> IF_TIMES_3_IN_1_GGA4(X, Y, Z, times_3_in_gga3(X, Y, U))
TIMES_3_IN_GGA3(s_11(X), Y, Z) -> TIMES_3_IN_GGA3(X, Y, U)
IF_TIMES_3_IN_1_GGA4(X, Y, Z, times_3_out_gga3(X, Y, U)) -> IF_TIMES_3_IN_2_GGA5(X, Y, Z, U, add_3_in_gga3(U, Y, Z))
IF_TIMES_3_IN_1_GGA4(X, Y, Z, times_3_out_gga3(X, Y, U)) -> ADD_3_IN_GGA3(U, Y, Z)
ADD_3_IN_GGA3(s_11(X), Y, s_11(Z)) -> IF_ADD_3_IN_1_GGA4(X, Y, Z, add_3_in_gga3(X, Y, Z))
ADD_3_IN_GGA3(s_11(X), Y, s_11(Z)) -> ADD_3_IN_GGA3(X, Y, Z)
IF_NOT_DIVIDES_2_IN_2_GG4(Y, X, U, times_3_out_gga3(U, Y, Z)) -> IF_NOT_DIVIDES_2_IN_3_GG4(Y, X, Z, neq_2_in_gg2(X, Z))
IF_NOT_DIVIDES_2_IN_2_GG4(Y, X, U, times_3_out_gga3(U, Y, Z)) -> NEQ_2_IN_GG2(X, Z)
NEQ_2_IN_GG2(s_11(X), s_11(Y)) -> IF_NEQ_2_IN_1_GG3(X, Y, neq_2_in_gg2(X, Y))
NEQ_2_IN_GG2(s_11(X), s_11(Y)) -> NEQ_2_IN_GG2(X, Y)
IF_PR_2_IN_1_GG3(X, Y, not_divides_2_out_gg2(s_11(s_11(Y)), X)) -> IF_PR_2_IN_2_GG3(X, Y, pr_2_in_gg2(X, s_11(Y)))
IF_PR_2_IN_1_GG3(X, Y, not_divides_2_out_gg2(s_11(s_11(Y)), X)) -> PR_2_IN_GG2(X, s_11(Y))

The TRS R consists of the following rules:

prime_1_in_g1(s_11(s_11(X))) -> if_prime_1_in_1_g2(X, pr_2_in_gg2(s_11(s_11(X)), s_11(X)))
pr_2_in_gg2(X, s_11(0_0)) -> pr_2_out_gg2(X, s_11(0_0))
pr_2_in_gg2(X, s_11(s_11(Y))) -> if_pr_2_in_1_gg3(X, Y, not_divides_2_in_gg2(s_11(s_11(Y)), X))
not_divides_2_in_gg2(Y, X) -> if_not_divides_2_in_1_gg3(Y, X, div_3_in_gga3(X, Y, U))
div_3_in_gga3(X, Y, Z) -> if_div_3_in_1_gga4(X, Y, Z, quot_4_in_ggga4(X, Y, Y, Z))
quot_4_in_ggga4(0_0, s_11(Y), s_11(Z), 0_0) -> quot_4_out_ggga4(0_0, s_11(Y), s_11(Z), 0_0)
quot_4_in_ggga4(s_11(X), s_11(Y), Z, U) -> if_quot_4_in_1_ggga5(X, Y, Z, U, quot_4_in_ggga4(X, Y, Z, U))
quot_4_in_ggga4(X, 0_0, s_11(Z), s_11(U)) -> if_quot_4_in_2_ggga4(X, Z, U, quot_4_in_ggga4(X, s_11(Z), s_11(Z), U))
if_quot_4_in_2_ggga4(X, Z, U, quot_4_out_ggga4(X, s_11(Z), s_11(Z), U)) -> quot_4_out_ggga4(X, 0_0, s_11(Z), s_11(U))
if_quot_4_in_1_ggga5(X, Y, Z, U, quot_4_out_ggga4(X, Y, Z, U)) -> quot_4_out_ggga4(s_11(X), s_11(Y), Z, U)
if_div_3_in_1_gga4(X, Y, Z, quot_4_out_ggga4(X, Y, Y, Z)) -> div_3_out_gga3(X, Y, Z)
if_not_divides_2_in_1_gg3(Y, X, div_3_out_gga3(X, Y, U)) -> if_not_divides_2_in_2_gg4(Y, X, U, times_3_in_gga3(U, Y, Z))
times_3_in_gga3(0_0, Y, 0_0) -> times_3_out_gga3(0_0, Y, 0_0)
times_3_in_gga3(s_11(X), Y, Z) -> if_times_3_in_1_gga4(X, Y, Z, times_3_in_gga3(X, Y, U))
if_times_3_in_1_gga4(X, Y, Z, times_3_out_gga3(X, Y, U)) -> if_times_3_in_2_gga5(X, Y, Z, U, add_3_in_gga3(U, Y, Z))
add_3_in_gga3(X, 0_0, X) -> add_3_out_gga3(X, 0_0, X)
add_3_in_gga3(0_0, X, X) -> add_3_out_gga3(0_0, X, X)
add_3_in_gga3(s_11(X), Y, s_11(Z)) -> if_add_3_in_1_gga4(X, Y, Z, add_3_in_gga3(X, Y, Z))
if_add_3_in_1_gga4(X, Y, Z, add_3_out_gga3(X, Y, Z)) -> add_3_out_gga3(s_11(X), Y, s_11(Z))
if_times_3_in_2_gga5(X, Y, Z, U, add_3_out_gga3(U, Y, Z)) -> times_3_out_gga3(s_11(X), Y, Z)
if_not_divides_2_in_2_gg4(Y, X, U, times_3_out_gga3(U, Y, Z)) -> if_not_divides_2_in_3_gg4(Y, X, Z, neq_2_in_gg2(X, Z))
neq_2_in_gg2(s_11(X), 0_0) -> neq_2_out_gg2(s_11(X), 0_0)
neq_2_in_gg2(0_0, s_11(X)) -> neq_2_out_gg2(0_0, s_11(X))
neq_2_in_gg2(s_11(X), s_11(Y)) -> if_neq_2_in_1_gg3(X, Y, neq_2_in_gg2(X, Y))
if_neq_2_in_1_gg3(X, Y, neq_2_out_gg2(X, Y)) -> neq_2_out_gg2(s_11(X), s_11(Y))
if_not_divides_2_in_3_gg4(Y, X, Z, neq_2_out_gg2(X, Z)) -> not_divides_2_out_gg2(Y, X)
if_pr_2_in_1_gg3(X, Y, not_divides_2_out_gg2(s_11(s_11(Y)), X)) -> if_pr_2_in_2_gg3(X, Y, pr_2_in_gg2(X, s_11(Y)))
if_pr_2_in_2_gg3(X, Y, pr_2_out_gg2(X, s_11(Y))) -> pr_2_out_gg2(X, s_11(s_11(Y)))
if_prime_1_in_1_g2(X, pr_2_out_gg2(s_11(s_11(X)), s_11(X))) -> prime_1_out_g1(s_11(s_11(X)))

The argument filtering Pi contains the following mapping:
prime_1_in_g1(x1)  =  prime_1_in_g1(x1)
0_0  =  0_0
s_11(x1)  =  s_11(x1)
if_prime_1_in_1_g2(x1, x2)  =  if_prime_1_in_1_g1(x2)
pr_2_in_gg2(x1, x2)  =  pr_2_in_gg2(x1, x2)
pr_2_out_gg2(x1, x2)  =  pr_2_out_gg
if_pr_2_in_1_gg3(x1, x2, x3)  =  if_pr_2_in_1_gg3(x1, x2, x3)
not_divides_2_in_gg2(x1, x2)  =  not_divides_2_in_gg2(x1, x2)
if_not_divides_2_in_1_gg3(x1, x2, x3)  =  if_not_divides_2_in_1_gg3(x1, x2, x3)
div_3_in_gga3(x1, x2, x3)  =  div_3_in_gga2(x1, x2)
if_div_3_in_1_gga4(x1, x2, x3, x4)  =  if_div_3_in_1_gga1(x4)
quot_4_in_ggga4(x1, x2, x3, x4)  =  quot_4_in_ggga3(x1, x2, x3)
quot_4_out_ggga4(x1, x2, x3, x4)  =  quot_4_out_ggga1(x4)
if_quot_4_in_1_ggga5(x1, x2, x3, x4, x5)  =  if_quot_4_in_1_ggga1(x5)
if_quot_4_in_2_ggga4(x1, x2, x3, x4)  =  if_quot_4_in_2_ggga1(x4)
div_3_out_gga3(x1, x2, x3)  =  div_3_out_gga1(x3)
if_not_divides_2_in_2_gg4(x1, x2, x3, x4)  =  if_not_divides_2_in_2_gg2(x2, x4)
times_3_in_gga3(x1, x2, x3)  =  times_3_in_gga2(x1, x2)
times_3_out_gga3(x1, x2, x3)  =  times_3_out_gga1(x3)
if_times_3_in_1_gga4(x1, x2, x3, x4)  =  if_times_3_in_1_gga2(x2, x4)
if_times_3_in_2_gga5(x1, x2, x3, x4, x5)  =  if_times_3_in_2_gga1(x5)
add_3_in_gga3(x1, x2, x3)  =  add_3_in_gga2(x1, x2)
add_3_out_gga3(x1, x2, x3)  =  add_3_out_gga1(x3)
if_add_3_in_1_gga4(x1, x2, x3, x4)  =  if_add_3_in_1_gga1(x4)
if_not_divides_2_in_3_gg4(x1, x2, x3, x4)  =  if_not_divides_2_in_3_gg1(x4)
neq_2_in_gg2(x1, x2)  =  neq_2_in_gg2(x1, x2)
neq_2_out_gg2(x1, x2)  =  neq_2_out_gg
if_neq_2_in_1_gg3(x1, x2, x3)  =  if_neq_2_in_1_gg1(x3)
not_divides_2_out_gg2(x1, x2)  =  not_divides_2_out_gg
if_pr_2_in_2_gg3(x1, x2, x3)  =  if_pr_2_in_2_gg1(x3)
prime_1_out_g1(x1)  =  prime_1_out_g
IF_TIMES_3_IN_1_GGA4(x1, x2, x3, x4)  =  IF_TIMES_3_IN_1_GGA2(x2, x4)
QUOT_4_IN_GGGA4(x1, x2, x3, x4)  =  QUOT_4_IN_GGGA3(x1, x2, x3)
PR_2_IN_GG2(x1, x2)  =  PR_2_IN_GG2(x1, x2)
ADD_3_IN_GGA3(x1, x2, x3)  =  ADD_3_IN_GGA2(x1, x2)
NOT_DIVIDES_2_IN_GG2(x1, x2)  =  NOT_DIVIDES_2_IN_GG2(x1, x2)
TIMES_3_IN_GGA3(x1, x2, x3)  =  TIMES_3_IN_GGA2(x1, x2)
IF_NEQ_2_IN_1_GG3(x1, x2, x3)  =  IF_NEQ_2_IN_1_GG1(x3)
IF_QUOT_4_IN_1_GGGA5(x1, x2, x3, x4, x5)  =  IF_QUOT_4_IN_1_GGGA1(x5)
IF_NOT_DIVIDES_2_IN_3_GG4(x1, x2, x3, x4)  =  IF_NOT_DIVIDES_2_IN_3_GG1(x4)
IF_PR_2_IN_1_GG3(x1, x2, x3)  =  IF_PR_2_IN_1_GG3(x1, x2, x3)
IF_PR_2_IN_2_GG3(x1, x2, x3)  =  IF_PR_2_IN_2_GG1(x3)
NEQ_2_IN_GG2(x1, x2)  =  NEQ_2_IN_GG2(x1, x2)
DIV_3_IN_GGA3(x1, x2, x3)  =  DIV_3_IN_GGA2(x1, x2)
IF_TIMES_3_IN_2_GGA5(x1, x2, x3, x4, x5)  =  IF_TIMES_3_IN_2_GGA1(x5)
PRIME_1_IN_G1(x1)  =  PRIME_1_IN_G1(x1)
IF_NOT_DIVIDES_2_IN_1_GG3(x1, x2, x3)  =  IF_NOT_DIVIDES_2_IN_1_GG3(x1, x2, x3)
IF_ADD_3_IN_1_GGA4(x1, x2, x3, x4)  =  IF_ADD_3_IN_1_GGA1(x4)
IF_NOT_DIVIDES_2_IN_2_GG4(x1, x2, x3, x4)  =  IF_NOT_DIVIDES_2_IN_2_GG2(x2, x4)
IF_DIV_3_IN_1_GGA4(x1, x2, x3, x4)  =  IF_DIV_3_IN_1_GGA1(x4)
IF_QUOT_4_IN_2_GGGA4(x1, x2, x3, x4)  =  IF_QUOT_4_IN_2_GGGA1(x4)
IF_PRIME_1_IN_1_G2(x1, x2)  =  IF_PRIME_1_IN_1_G1(x2)

We have to consider all (P,R,Pi)-chains

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof

Pi DP problem:
The TRS P consists of the following rules:

PRIME_1_IN_G1(s_11(s_11(X))) -> IF_PRIME_1_IN_1_G2(X, pr_2_in_gg2(s_11(s_11(X)), s_11(X)))
PRIME_1_IN_G1(s_11(s_11(X))) -> PR_2_IN_GG2(s_11(s_11(X)), s_11(X))
PR_2_IN_GG2(X, s_11(s_11(Y))) -> IF_PR_2_IN_1_GG3(X, Y, not_divides_2_in_gg2(s_11(s_11(Y)), X))
PR_2_IN_GG2(X, s_11(s_11(Y))) -> NOT_DIVIDES_2_IN_GG2(s_11(s_11(Y)), X)
NOT_DIVIDES_2_IN_GG2(Y, X) -> IF_NOT_DIVIDES_2_IN_1_GG3(Y, X, div_3_in_gga3(X, Y, U))
NOT_DIVIDES_2_IN_GG2(Y, X) -> DIV_3_IN_GGA3(X, Y, U)
DIV_3_IN_GGA3(X, Y, Z) -> IF_DIV_3_IN_1_GGA4(X, Y, Z, quot_4_in_ggga4(X, Y, Y, Z))
DIV_3_IN_GGA3(X, Y, Z) -> QUOT_4_IN_GGGA4(X, Y, Y, Z)
QUOT_4_IN_GGGA4(s_11(X), s_11(Y), Z, U) -> IF_QUOT_4_IN_1_GGGA5(X, Y, Z, U, quot_4_in_ggga4(X, Y, Z, U))
QUOT_4_IN_GGGA4(s_11(X), s_11(Y), Z, U) -> QUOT_4_IN_GGGA4(X, Y, Z, U)
QUOT_4_IN_GGGA4(X, 0_0, s_11(Z), s_11(U)) -> IF_QUOT_4_IN_2_GGGA4(X, Z, U, quot_4_in_ggga4(X, s_11(Z), s_11(Z), U))
QUOT_4_IN_GGGA4(X, 0_0, s_11(Z), s_11(U)) -> QUOT_4_IN_GGGA4(X, s_11(Z), s_11(Z), U)
IF_NOT_DIVIDES_2_IN_1_GG3(Y, X, div_3_out_gga3(X, Y, U)) -> IF_NOT_DIVIDES_2_IN_2_GG4(Y, X, U, times_3_in_gga3(U, Y, Z))
IF_NOT_DIVIDES_2_IN_1_GG3(Y, X, div_3_out_gga3(X, Y, U)) -> TIMES_3_IN_GGA3(U, Y, Z)
TIMES_3_IN_GGA3(s_11(X), Y, Z) -> IF_TIMES_3_IN_1_GGA4(X, Y, Z, times_3_in_gga3(X, Y, U))
TIMES_3_IN_GGA3(s_11(X), Y, Z) -> TIMES_3_IN_GGA3(X, Y, U)
IF_TIMES_3_IN_1_GGA4(X, Y, Z, times_3_out_gga3(X, Y, U)) -> IF_TIMES_3_IN_2_GGA5(X, Y, Z, U, add_3_in_gga3(U, Y, Z))
IF_TIMES_3_IN_1_GGA4(X, Y, Z, times_3_out_gga3(X, Y, U)) -> ADD_3_IN_GGA3(U, Y, Z)
ADD_3_IN_GGA3(s_11(X), Y, s_11(Z)) -> IF_ADD_3_IN_1_GGA4(X, Y, Z, add_3_in_gga3(X, Y, Z))
ADD_3_IN_GGA3(s_11(X), Y, s_11(Z)) -> ADD_3_IN_GGA3(X, Y, Z)
IF_NOT_DIVIDES_2_IN_2_GG4(Y, X, U, times_3_out_gga3(U, Y, Z)) -> IF_NOT_DIVIDES_2_IN_3_GG4(Y, X, Z, neq_2_in_gg2(X, Z))
IF_NOT_DIVIDES_2_IN_2_GG4(Y, X, U, times_3_out_gga3(U, Y, Z)) -> NEQ_2_IN_GG2(X, Z)
NEQ_2_IN_GG2(s_11(X), s_11(Y)) -> IF_NEQ_2_IN_1_GG3(X, Y, neq_2_in_gg2(X, Y))
NEQ_2_IN_GG2(s_11(X), s_11(Y)) -> NEQ_2_IN_GG2(X, Y)
IF_PR_2_IN_1_GG3(X, Y, not_divides_2_out_gg2(s_11(s_11(Y)), X)) -> IF_PR_2_IN_2_GG3(X, Y, pr_2_in_gg2(X, s_11(Y)))
IF_PR_2_IN_1_GG3(X, Y, not_divides_2_out_gg2(s_11(s_11(Y)), X)) -> PR_2_IN_GG2(X, s_11(Y))

The TRS R consists of the following rules:

prime_1_in_g1(s_11(s_11(X))) -> if_prime_1_in_1_g2(X, pr_2_in_gg2(s_11(s_11(X)), s_11(X)))
pr_2_in_gg2(X, s_11(0_0)) -> pr_2_out_gg2(X, s_11(0_0))
pr_2_in_gg2(X, s_11(s_11(Y))) -> if_pr_2_in_1_gg3(X, Y, not_divides_2_in_gg2(s_11(s_11(Y)), X))
not_divides_2_in_gg2(Y, X) -> if_not_divides_2_in_1_gg3(Y, X, div_3_in_gga3(X, Y, U))
div_3_in_gga3(X, Y, Z) -> if_div_3_in_1_gga4(X, Y, Z, quot_4_in_ggga4(X, Y, Y, Z))
quot_4_in_ggga4(0_0, s_11(Y), s_11(Z), 0_0) -> quot_4_out_ggga4(0_0, s_11(Y), s_11(Z), 0_0)
quot_4_in_ggga4(s_11(X), s_11(Y), Z, U) -> if_quot_4_in_1_ggga5(X, Y, Z, U, quot_4_in_ggga4(X, Y, Z, U))
quot_4_in_ggga4(X, 0_0, s_11(Z), s_11(U)) -> if_quot_4_in_2_ggga4(X, Z, U, quot_4_in_ggga4(X, s_11(Z), s_11(Z), U))
if_quot_4_in_2_ggga4(X, Z, U, quot_4_out_ggga4(X, s_11(Z), s_11(Z), U)) -> quot_4_out_ggga4(X, 0_0, s_11(Z), s_11(U))
if_quot_4_in_1_ggga5(X, Y, Z, U, quot_4_out_ggga4(X, Y, Z, U)) -> quot_4_out_ggga4(s_11(X), s_11(Y), Z, U)
if_div_3_in_1_gga4(X, Y, Z, quot_4_out_ggga4(X, Y, Y, Z)) -> div_3_out_gga3(X, Y, Z)
if_not_divides_2_in_1_gg3(Y, X, div_3_out_gga3(X, Y, U)) -> if_not_divides_2_in_2_gg4(Y, X, U, times_3_in_gga3(U, Y, Z))
times_3_in_gga3(0_0, Y, 0_0) -> times_3_out_gga3(0_0, Y, 0_0)
times_3_in_gga3(s_11(X), Y, Z) -> if_times_3_in_1_gga4(X, Y, Z, times_3_in_gga3(X, Y, U))
if_times_3_in_1_gga4(X, Y, Z, times_3_out_gga3(X, Y, U)) -> if_times_3_in_2_gga5(X, Y, Z, U, add_3_in_gga3(U, Y, Z))
add_3_in_gga3(X, 0_0, X) -> add_3_out_gga3(X, 0_0, X)
add_3_in_gga3(0_0, X, X) -> add_3_out_gga3(0_0, X, X)
add_3_in_gga3(s_11(X), Y, s_11(Z)) -> if_add_3_in_1_gga4(X, Y, Z, add_3_in_gga3(X, Y, Z))
if_add_3_in_1_gga4(X, Y, Z, add_3_out_gga3(X, Y, Z)) -> add_3_out_gga3(s_11(X), Y, s_11(Z))
if_times_3_in_2_gga5(X, Y, Z, U, add_3_out_gga3(U, Y, Z)) -> times_3_out_gga3(s_11(X), Y, Z)
if_not_divides_2_in_2_gg4(Y, X, U, times_3_out_gga3(U, Y, Z)) -> if_not_divides_2_in_3_gg4(Y, X, Z, neq_2_in_gg2(X, Z))
neq_2_in_gg2(s_11(X), 0_0) -> neq_2_out_gg2(s_11(X), 0_0)
neq_2_in_gg2(0_0, s_11(X)) -> neq_2_out_gg2(0_0, s_11(X))
neq_2_in_gg2(s_11(X), s_11(Y)) -> if_neq_2_in_1_gg3(X, Y, neq_2_in_gg2(X, Y))
if_neq_2_in_1_gg3(X, Y, neq_2_out_gg2(X, Y)) -> neq_2_out_gg2(s_11(X), s_11(Y))
if_not_divides_2_in_3_gg4(Y, X, Z, neq_2_out_gg2(X, Z)) -> not_divides_2_out_gg2(Y, X)
if_pr_2_in_1_gg3(X, Y, not_divides_2_out_gg2(s_11(s_11(Y)), X)) -> if_pr_2_in_2_gg3(X, Y, pr_2_in_gg2(X, s_11(Y)))
if_pr_2_in_2_gg3(X, Y, pr_2_out_gg2(X, s_11(Y))) -> pr_2_out_gg2(X, s_11(s_11(Y)))
if_prime_1_in_1_g2(X, pr_2_out_gg2(s_11(s_11(X)), s_11(X))) -> prime_1_out_g1(s_11(s_11(X)))

The argument filtering Pi contains the following mapping:
prime_1_in_g1(x1)  =  prime_1_in_g1(x1)
0_0  =  0_0
s_11(x1)  =  s_11(x1)
if_prime_1_in_1_g2(x1, x2)  =  if_prime_1_in_1_g1(x2)
pr_2_in_gg2(x1, x2)  =  pr_2_in_gg2(x1, x2)
pr_2_out_gg2(x1, x2)  =  pr_2_out_gg
if_pr_2_in_1_gg3(x1, x2, x3)  =  if_pr_2_in_1_gg3(x1, x2, x3)
not_divides_2_in_gg2(x1, x2)  =  not_divides_2_in_gg2(x1, x2)
if_not_divides_2_in_1_gg3(x1, x2, x3)  =  if_not_divides_2_in_1_gg3(x1, x2, x3)
div_3_in_gga3(x1, x2, x3)  =  div_3_in_gga2(x1, x2)
if_div_3_in_1_gga4(x1, x2, x3, x4)  =  if_div_3_in_1_gga1(x4)
quot_4_in_ggga4(x1, x2, x3, x4)  =  quot_4_in_ggga3(x1, x2, x3)
quot_4_out_ggga4(x1, x2, x3, x4)  =  quot_4_out_ggga1(x4)
if_quot_4_in_1_ggga5(x1, x2, x3, x4, x5)  =  if_quot_4_in_1_ggga1(x5)
if_quot_4_in_2_ggga4(x1, x2, x3, x4)  =  if_quot_4_in_2_ggga1(x4)
div_3_out_gga3(x1, x2, x3)  =  div_3_out_gga1(x3)
if_not_divides_2_in_2_gg4(x1, x2, x3, x4)  =  if_not_divides_2_in_2_gg2(x2, x4)
times_3_in_gga3(x1, x2, x3)  =  times_3_in_gga2(x1, x2)
times_3_out_gga3(x1, x2, x3)  =  times_3_out_gga1(x3)
if_times_3_in_1_gga4(x1, x2, x3, x4)  =  if_times_3_in_1_gga2(x2, x4)
if_times_3_in_2_gga5(x1, x2, x3, x4, x5)  =  if_times_3_in_2_gga1(x5)
add_3_in_gga3(x1, x2, x3)  =  add_3_in_gga2(x1, x2)
add_3_out_gga3(x1, x2, x3)  =  add_3_out_gga1(x3)
if_add_3_in_1_gga4(x1, x2, x3, x4)  =  if_add_3_in_1_gga1(x4)
if_not_divides_2_in_3_gg4(x1, x2, x3, x4)  =  if_not_divides_2_in_3_gg1(x4)
neq_2_in_gg2(x1, x2)  =  neq_2_in_gg2(x1, x2)
neq_2_out_gg2(x1, x2)  =  neq_2_out_gg
if_neq_2_in_1_gg3(x1, x2, x3)  =  if_neq_2_in_1_gg1(x3)
not_divides_2_out_gg2(x1, x2)  =  not_divides_2_out_gg
if_pr_2_in_2_gg3(x1, x2, x3)  =  if_pr_2_in_2_gg1(x3)
prime_1_out_g1(x1)  =  prime_1_out_g
IF_TIMES_3_IN_1_GGA4(x1, x2, x3, x4)  =  IF_TIMES_3_IN_1_GGA2(x2, x4)
QUOT_4_IN_GGGA4(x1, x2, x3, x4)  =  QUOT_4_IN_GGGA3(x1, x2, x3)
PR_2_IN_GG2(x1, x2)  =  PR_2_IN_GG2(x1, x2)
ADD_3_IN_GGA3(x1, x2, x3)  =  ADD_3_IN_GGA2(x1, x2)
NOT_DIVIDES_2_IN_GG2(x1, x2)  =  NOT_DIVIDES_2_IN_GG2(x1, x2)
TIMES_3_IN_GGA3(x1, x2, x3)  =  TIMES_3_IN_GGA2(x1, x2)
IF_NEQ_2_IN_1_GG3(x1, x2, x3)  =  IF_NEQ_2_IN_1_GG1(x3)
IF_QUOT_4_IN_1_GGGA5(x1, x2, x3, x4, x5)  =  IF_QUOT_4_IN_1_GGGA1(x5)
IF_NOT_DIVIDES_2_IN_3_GG4(x1, x2, x3, x4)  =  IF_NOT_DIVIDES_2_IN_3_GG1(x4)
IF_PR_2_IN_1_GG3(x1, x2, x3)  =  IF_PR_2_IN_1_GG3(x1, x2, x3)
IF_PR_2_IN_2_GG3(x1, x2, x3)  =  IF_PR_2_IN_2_GG1(x3)
NEQ_2_IN_GG2(x1, x2)  =  NEQ_2_IN_GG2(x1, x2)
DIV_3_IN_GGA3(x1, x2, x3)  =  DIV_3_IN_GGA2(x1, x2)
IF_TIMES_3_IN_2_GGA5(x1, x2, x3, x4, x5)  =  IF_TIMES_3_IN_2_GGA1(x5)
PRIME_1_IN_G1(x1)  =  PRIME_1_IN_G1(x1)
IF_NOT_DIVIDES_2_IN_1_GG3(x1, x2, x3)  =  IF_NOT_DIVIDES_2_IN_1_GG3(x1, x2, x3)
IF_ADD_3_IN_1_GGA4(x1, x2, x3, x4)  =  IF_ADD_3_IN_1_GGA1(x4)
IF_NOT_DIVIDES_2_IN_2_GG4(x1, x2, x3, x4)  =  IF_NOT_DIVIDES_2_IN_2_GG2(x2, x4)
IF_DIV_3_IN_1_GGA4(x1, x2, x3, x4)  =  IF_DIV_3_IN_1_GGA1(x4)
IF_QUOT_4_IN_2_GGGA4(x1, x2, x3, x4)  =  IF_QUOT_4_IN_2_GGGA1(x4)
IF_PRIME_1_IN_1_G2(x1, x2)  =  IF_PRIME_1_IN_1_G1(x2)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph contains 5 SCCs with 19 less nodes.

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

NEQ_2_IN_GG2(s_11(X), s_11(Y)) -> NEQ_2_IN_GG2(X, Y)

The TRS R consists of the following rules:

prime_1_in_g1(s_11(s_11(X))) -> if_prime_1_in_1_g2(X, pr_2_in_gg2(s_11(s_11(X)), s_11(X)))
pr_2_in_gg2(X, s_11(0_0)) -> pr_2_out_gg2(X, s_11(0_0))
pr_2_in_gg2(X, s_11(s_11(Y))) -> if_pr_2_in_1_gg3(X, Y, not_divides_2_in_gg2(s_11(s_11(Y)), X))
not_divides_2_in_gg2(Y, X) -> if_not_divides_2_in_1_gg3(Y, X, div_3_in_gga3(X, Y, U))
div_3_in_gga3(X, Y, Z) -> if_div_3_in_1_gga4(X, Y, Z, quot_4_in_ggga4(X, Y, Y, Z))
quot_4_in_ggga4(0_0, s_11(Y), s_11(Z), 0_0) -> quot_4_out_ggga4(0_0, s_11(Y), s_11(Z), 0_0)
quot_4_in_ggga4(s_11(X), s_11(Y), Z, U) -> if_quot_4_in_1_ggga5(X, Y, Z, U, quot_4_in_ggga4(X, Y, Z, U))
quot_4_in_ggga4(X, 0_0, s_11(Z), s_11(U)) -> if_quot_4_in_2_ggga4(X, Z, U, quot_4_in_ggga4(X, s_11(Z), s_11(Z), U))
if_quot_4_in_2_ggga4(X, Z, U, quot_4_out_ggga4(X, s_11(Z), s_11(Z), U)) -> quot_4_out_ggga4(X, 0_0, s_11(Z), s_11(U))
if_quot_4_in_1_ggga5(X, Y, Z, U, quot_4_out_ggga4(X, Y, Z, U)) -> quot_4_out_ggga4(s_11(X), s_11(Y), Z, U)
if_div_3_in_1_gga4(X, Y, Z, quot_4_out_ggga4(X, Y, Y, Z)) -> div_3_out_gga3(X, Y, Z)
if_not_divides_2_in_1_gg3(Y, X, div_3_out_gga3(X, Y, U)) -> if_not_divides_2_in_2_gg4(Y, X, U, times_3_in_gga3(U, Y, Z))
times_3_in_gga3(0_0, Y, 0_0) -> times_3_out_gga3(0_0, Y, 0_0)
times_3_in_gga3(s_11(X), Y, Z) -> if_times_3_in_1_gga4(X, Y, Z, times_3_in_gga3(X, Y, U))
if_times_3_in_1_gga4(X, Y, Z, times_3_out_gga3(X, Y, U)) -> if_times_3_in_2_gga5(X, Y, Z, U, add_3_in_gga3(U, Y, Z))
add_3_in_gga3(X, 0_0, X) -> add_3_out_gga3(X, 0_0, X)
add_3_in_gga3(0_0, X, X) -> add_3_out_gga3(0_0, X, X)
add_3_in_gga3(s_11(X), Y, s_11(Z)) -> if_add_3_in_1_gga4(X, Y, Z, add_3_in_gga3(X, Y, Z))
if_add_3_in_1_gga4(X, Y, Z, add_3_out_gga3(X, Y, Z)) -> add_3_out_gga3(s_11(X), Y, s_11(Z))
if_times_3_in_2_gga5(X, Y, Z, U, add_3_out_gga3(U, Y, Z)) -> times_3_out_gga3(s_11(X), Y, Z)
if_not_divides_2_in_2_gg4(Y, X, U, times_3_out_gga3(U, Y, Z)) -> if_not_divides_2_in_3_gg4(Y, X, Z, neq_2_in_gg2(X, Z))
neq_2_in_gg2(s_11(X), 0_0) -> neq_2_out_gg2(s_11(X), 0_0)
neq_2_in_gg2(0_0, s_11(X)) -> neq_2_out_gg2(0_0, s_11(X))
neq_2_in_gg2(s_11(X), s_11(Y)) -> if_neq_2_in_1_gg3(X, Y, neq_2_in_gg2(X, Y))
if_neq_2_in_1_gg3(X, Y, neq_2_out_gg2(X, Y)) -> neq_2_out_gg2(s_11(X), s_11(Y))
if_not_divides_2_in_3_gg4(Y, X, Z, neq_2_out_gg2(X, Z)) -> not_divides_2_out_gg2(Y, X)
if_pr_2_in_1_gg3(X, Y, not_divides_2_out_gg2(s_11(s_11(Y)), X)) -> if_pr_2_in_2_gg3(X, Y, pr_2_in_gg2(X, s_11(Y)))
if_pr_2_in_2_gg3(X, Y, pr_2_out_gg2(X, s_11(Y))) -> pr_2_out_gg2(X, s_11(s_11(Y)))
if_prime_1_in_1_g2(X, pr_2_out_gg2(s_11(s_11(X)), s_11(X))) -> prime_1_out_g1(s_11(s_11(X)))

The argument filtering Pi contains the following mapping:
prime_1_in_g1(x1)  =  prime_1_in_g1(x1)
0_0  =  0_0
s_11(x1)  =  s_11(x1)
if_prime_1_in_1_g2(x1, x2)  =  if_prime_1_in_1_g1(x2)
pr_2_in_gg2(x1, x2)  =  pr_2_in_gg2(x1, x2)
pr_2_out_gg2(x1, x2)  =  pr_2_out_gg
if_pr_2_in_1_gg3(x1, x2, x3)  =  if_pr_2_in_1_gg3(x1, x2, x3)
not_divides_2_in_gg2(x1, x2)  =  not_divides_2_in_gg2(x1, x2)
if_not_divides_2_in_1_gg3(x1, x2, x3)  =  if_not_divides_2_in_1_gg3(x1, x2, x3)
div_3_in_gga3(x1, x2, x3)  =  div_3_in_gga2(x1, x2)
if_div_3_in_1_gga4(x1, x2, x3, x4)  =  if_div_3_in_1_gga1(x4)
quot_4_in_ggga4(x1, x2, x3, x4)  =  quot_4_in_ggga3(x1, x2, x3)
quot_4_out_ggga4(x1, x2, x3, x4)  =  quot_4_out_ggga1(x4)
if_quot_4_in_1_ggga5(x1, x2, x3, x4, x5)  =  if_quot_4_in_1_ggga1(x5)
if_quot_4_in_2_ggga4(x1, x2, x3, x4)  =  if_quot_4_in_2_ggga1(x4)
div_3_out_gga3(x1, x2, x3)  =  div_3_out_gga1(x3)
if_not_divides_2_in_2_gg4(x1, x2, x3, x4)  =  if_not_divides_2_in_2_gg2(x2, x4)
times_3_in_gga3(x1, x2, x3)  =  times_3_in_gga2(x1, x2)
times_3_out_gga3(x1, x2, x3)  =  times_3_out_gga1(x3)
if_times_3_in_1_gga4(x1, x2, x3, x4)  =  if_times_3_in_1_gga2(x2, x4)
if_times_3_in_2_gga5(x1, x2, x3, x4, x5)  =  if_times_3_in_2_gga1(x5)
add_3_in_gga3(x1, x2, x3)  =  add_3_in_gga2(x1, x2)
add_3_out_gga3(x1, x2, x3)  =  add_3_out_gga1(x3)
if_add_3_in_1_gga4(x1, x2, x3, x4)  =  if_add_3_in_1_gga1(x4)
if_not_divides_2_in_3_gg4(x1, x2, x3, x4)  =  if_not_divides_2_in_3_gg1(x4)
neq_2_in_gg2(x1, x2)  =  neq_2_in_gg2(x1, x2)
neq_2_out_gg2(x1, x2)  =  neq_2_out_gg
if_neq_2_in_1_gg3(x1, x2, x3)  =  if_neq_2_in_1_gg1(x3)
not_divides_2_out_gg2(x1, x2)  =  not_divides_2_out_gg
if_pr_2_in_2_gg3(x1, x2, x3)  =  if_pr_2_in_2_gg1(x3)
prime_1_out_g1(x1)  =  prime_1_out_g
NEQ_2_IN_GG2(x1, x2)  =  NEQ_2_IN_GG2(x1, x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting we can delete all non-usable rules from R.

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

NEQ_2_IN_GG2(s_11(X), s_11(Y)) -> NEQ_2_IN_GG2(X, Y)

R is empty.
Pi is empty.
We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem into ordinary QDP problem by application of Pi.

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

NEQ_2_IN_GG2(s_11(X), s_11(Y)) -> NEQ_2_IN_GG2(X, Y)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
The head symbols of this DP problem are {NEQ_2_IN_GG2}.
By using the subterm criterion together with the size-change analysis we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

ADD_3_IN_GGA3(s_11(X), Y, s_11(Z)) -> ADD_3_IN_GGA3(X, Y, Z)

The TRS R consists of the following rules:

prime_1_in_g1(s_11(s_11(X))) -> if_prime_1_in_1_g2(X, pr_2_in_gg2(s_11(s_11(X)), s_11(X)))
pr_2_in_gg2(X, s_11(0_0)) -> pr_2_out_gg2(X, s_11(0_0))
pr_2_in_gg2(X, s_11(s_11(Y))) -> if_pr_2_in_1_gg3(X, Y, not_divides_2_in_gg2(s_11(s_11(Y)), X))
not_divides_2_in_gg2(Y, X) -> if_not_divides_2_in_1_gg3(Y, X, div_3_in_gga3(X, Y, U))
div_3_in_gga3(X, Y, Z) -> if_div_3_in_1_gga4(X, Y, Z, quot_4_in_ggga4(X, Y, Y, Z))
quot_4_in_ggga4(0_0, s_11(Y), s_11(Z), 0_0) -> quot_4_out_ggga4(0_0, s_11(Y), s_11(Z), 0_0)
quot_4_in_ggga4(s_11(X), s_11(Y), Z, U) -> if_quot_4_in_1_ggga5(X, Y, Z, U, quot_4_in_ggga4(X, Y, Z, U))
quot_4_in_ggga4(X, 0_0, s_11(Z), s_11(U)) -> if_quot_4_in_2_ggga4(X, Z, U, quot_4_in_ggga4(X, s_11(Z), s_11(Z), U))
if_quot_4_in_2_ggga4(X, Z, U, quot_4_out_ggga4(X, s_11(Z), s_11(Z), U)) -> quot_4_out_ggga4(X, 0_0, s_11(Z), s_11(U))
if_quot_4_in_1_ggga5(X, Y, Z, U, quot_4_out_ggga4(X, Y, Z, U)) -> quot_4_out_ggga4(s_11(X), s_11(Y), Z, U)
if_div_3_in_1_gga4(X, Y, Z, quot_4_out_ggga4(X, Y, Y, Z)) -> div_3_out_gga3(X, Y, Z)
if_not_divides_2_in_1_gg3(Y, X, div_3_out_gga3(X, Y, U)) -> if_not_divides_2_in_2_gg4(Y, X, U, times_3_in_gga3(U, Y, Z))
times_3_in_gga3(0_0, Y, 0_0) -> times_3_out_gga3(0_0, Y, 0_0)
times_3_in_gga3(s_11(X), Y, Z) -> if_times_3_in_1_gga4(X, Y, Z, times_3_in_gga3(X, Y, U))
if_times_3_in_1_gga4(X, Y, Z, times_3_out_gga3(X, Y, U)) -> if_times_3_in_2_gga5(X, Y, Z, U, add_3_in_gga3(U, Y, Z))
add_3_in_gga3(X, 0_0, X) -> add_3_out_gga3(X, 0_0, X)
add_3_in_gga3(0_0, X, X) -> add_3_out_gga3(0_0, X, X)
add_3_in_gga3(s_11(X), Y, s_11(Z)) -> if_add_3_in_1_gga4(X, Y, Z, add_3_in_gga3(X, Y, Z))
if_add_3_in_1_gga4(X, Y, Z, add_3_out_gga3(X, Y, Z)) -> add_3_out_gga3(s_11(X), Y, s_11(Z))
if_times_3_in_2_gga5(X, Y, Z, U, add_3_out_gga3(U, Y, Z)) -> times_3_out_gga3(s_11(X), Y, Z)
if_not_divides_2_in_2_gg4(Y, X, U, times_3_out_gga3(U, Y, Z)) -> if_not_divides_2_in_3_gg4(Y, X, Z, neq_2_in_gg2(X, Z))
neq_2_in_gg2(s_11(X), 0_0) -> neq_2_out_gg2(s_11(X), 0_0)
neq_2_in_gg2(0_0, s_11(X)) -> neq_2_out_gg2(0_0, s_11(X))
neq_2_in_gg2(s_11(X), s_11(Y)) -> if_neq_2_in_1_gg3(X, Y, neq_2_in_gg2(X, Y))
if_neq_2_in_1_gg3(X, Y, neq_2_out_gg2(X, Y)) -> neq_2_out_gg2(s_11(X), s_11(Y))
if_not_divides_2_in_3_gg4(Y, X, Z, neq_2_out_gg2(X, Z)) -> not_divides_2_out_gg2(Y, X)
if_pr_2_in_1_gg3(X, Y, not_divides_2_out_gg2(s_11(s_11(Y)), X)) -> if_pr_2_in_2_gg3(X, Y, pr_2_in_gg2(X, s_11(Y)))
if_pr_2_in_2_gg3(X, Y, pr_2_out_gg2(X, s_11(Y))) -> pr_2_out_gg2(X, s_11(s_11(Y)))
if_prime_1_in_1_g2(X, pr_2_out_gg2(s_11(s_11(X)), s_11(X))) -> prime_1_out_g1(s_11(s_11(X)))

The argument filtering Pi contains the following mapping:
prime_1_in_g1(x1)  =  prime_1_in_g1(x1)
0_0  =  0_0
s_11(x1)  =  s_11(x1)
if_prime_1_in_1_g2(x1, x2)  =  if_prime_1_in_1_g1(x2)
pr_2_in_gg2(x1, x2)  =  pr_2_in_gg2(x1, x2)
pr_2_out_gg2(x1, x2)  =  pr_2_out_gg
if_pr_2_in_1_gg3(x1, x2, x3)  =  if_pr_2_in_1_gg3(x1, x2, x3)
not_divides_2_in_gg2(x1, x2)  =  not_divides_2_in_gg2(x1, x2)
if_not_divides_2_in_1_gg3(x1, x2, x3)  =  if_not_divides_2_in_1_gg3(x1, x2, x3)
div_3_in_gga3(x1, x2, x3)  =  div_3_in_gga2(x1, x2)
if_div_3_in_1_gga4(x1, x2, x3, x4)  =  if_div_3_in_1_gga1(x4)
quot_4_in_ggga4(x1, x2, x3, x4)  =  quot_4_in_ggga3(x1, x2, x3)
quot_4_out_ggga4(x1, x2, x3, x4)  =  quot_4_out_ggga1(x4)
if_quot_4_in_1_ggga5(x1, x2, x3, x4, x5)  =  if_quot_4_in_1_ggga1(x5)
if_quot_4_in_2_ggga4(x1, x2, x3, x4)  =  if_quot_4_in_2_ggga1(x4)
div_3_out_gga3(x1, x2, x3)  =  div_3_out_gga1(x3)
if_not_divides_2_in_2_gg4(x1, x2, x3, x4)  =  if_not_divides_2_in_2_gg2(x2, x4)
times_3_in_gga3(x1, x2, x3)  =  times_3_in_gga2(x1, x2)
times_3_out_gga3(x1, x2, x3)  =  times_3_out_gga1(x3)
if_times_3_in_1_gga4(x1, x2, x3, x4)  =  if_times_3_in_1_gga2(x2, x4)
if_times_3_in_2_gga5(x1, x2, x3, x4, x5)  =  if_times_3_in_2_gga1(x5)
add_3_in_gga3(x1, x2, x3)  =  add_3_in_gga2(x1, x2)
add_3_out_gga3(x1, x2, x3)  =  add_3_out_gga1(x3)
if_add_3_in_1_gga4(x1, x2, x3, x4)  =  if_add_3_in_1_gga1(x4)
if_not_divides_2_in_3_gg4(x1, x2, x3, x4)  =  if_not_divides_2_in_3_gg1(x4)
neq_2_in_gg2(x1, x2)  =  neq_2_in_gg2(x1, x2)
neq_2_out_gg2(x1, x2)  =  neq_2_out_gg
if_neq_2_in_1_gg3(x1, x2, x3)  =  if_neq_2_in_1_gg1(x3)
not_divides_2_out_gg2(x1, x2)  =  not_divides_2_out_gg
if_pr_2_in_2_gg3(x1, x2, x3)  =  if_pr_2_in_2_gg1(x3)
prime_1_out_g1(x1)  =  prime_1_out_g
ADD_3_IN_GGA3(x1, x2, x3)  =  ADD_3_IN_GGA2(x1, x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting we can delete all non-usable rules from R.

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

ADD_3_IN_GGA3(s_11(X), Y, s_11(Z)) -> ADD_3_IN_GGA3(X, Y, Z)

R is empty.
The argument filtering Pi contains the following mapping:
s_11(x1)  =  s_11(x1)
ADD_3_IN_GGA3(x1, x2, x3)  =  ADD_3_IN_GGA2(x1, x2)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem into ordinary QDP problem by application of Pi.

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

ADD_3_IN_GGA2(s_11(X), Y) -> ADD_3_IN_GGA2(X, Y)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
The head symbols of this DP problem are {ADD_3_IN_GGA2}.
By using the subterm criterion together with the size-change analysis we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

TIMES_3_IN_GGA3(s_11(X), Y, Z) -> TIMES_3_IN_GGA3(X, Y, U)

The TRS R consists of the following rules:

prime_1_in_g1(s_11(s_11(X))) -> if_prime_1_in_1_g2(X, pr_2_in_gg2(s_11(s_11(X)), s_11(X)))
pr_2_in_gg2(X, s_11(0_0)) -> pr_2_out_gg2(X, s_11(0_0))
pr_2_in_gg2(X, s_11(s_11(Y))) -> if_pr_2_in_1_gg3(X, Y, not_divides_2_in_gg2(s_11(s_11(Y)), X))
not_divides_2_in_gg2(Y, X) -> if_not_divides_2_in_1_gg3(Y, X, div_3_in_gga3(X, Y, U))
div_3_in_gga3(X, Y, Z) -> if_div_3_in_1_gga4(X, Y, Z, quot_4_in_ggga4(X, Y, Y, Z))
quot_4_in_ggga4(0_0, s_11(Y), s_11(Z), 0_0) -> quot_4_out_ggga4(0_0, s_11(Y), s_11(Z), 0_0)
quot_4_in_ggga4(s_11(X), s_11(Y), Z, U) -> if_quot_4_in_1_ggga5(X, Y, Z, U, quot_4_in_ggga4(X, Y, Z, U))
quot_4_in_ggga4(X, 0_0, s_11(Z), s_11(U)) -> if_quot_4_in_2_ggga4(X, Z, U, quot_4_in_ggga4(X, s_11(Z), s_11(Z), U))
if_quot_4_in_2_ggga4(X, Z, U, quot_4_out_ggga4(X, s_11(Z), s_11(Z), U)) -> quot_4_out_ggga4(X, 0_0, s_11(Z), s_11(U))
if_quot_4_in_1_ggga5(X, Y, Z, U, quot_4_out_ggga4(X, Y, Z, U)) -> quot_4_out_ggga4(s_11(X), s_11(Y), Z, U)
if_div_3_in_1_gga4(X, Y, Z, quot_4_out_ggga4(X, Y, Y, Z)) -> div_3_out_gga3(X, Y, Z)
if_not_divides_2_in_1_gg3(Y, X, div_3_out_gga3(X, Y, U)) -> if_not_divides_2_in_2_gg4(Y, X, U, times_3_in_gga3(U, Y, Z))
times_3_in_gga3(0_0, Y, 0_0) -> times_3_out_gga3(0_0, Y, 0_0)
times_3_in_gga3(s_11(X), Y, Z) -> if_times_3_in_1_gga4(X, Y, Z, times_3_in_gga3(X, Y, U))
if_times_3_in_1_gga4(X, Y, Z, times_3_out_gga3(X, Y, U)) -> if_times_3_in_2_gga5(X, Y, Z, U, add_3_in_gga3(U, Y, Z))
add_3_in_gga3(X, 0_0, X) -> add_3_out_gga3(X, 0_0, X)
add_3_in_gga3(0_0, X, X) -> add_3_out_gga3(0_0, X, X)
add_3_in_gga3(s_11(X), Y, s_11(Z)) -> if_add_3_in_1_gga4(X, Y, Z, add_3_in_gga3(X, Y, Z))
if_add_3_in_1_gga4(X, Y, Z, add_3_out_gga3(X, Y, Z)) -> add_3_out_gga3(s_11(X), Y, s_11(Z))
if_times_3_in_2_gga5(X, Y, Z, U, add_3_out_gga3(U, Y, Z)) -> times_3_out_gga3(s_11(X), Y, Z)
if_not_divides_2_in_2_gg4(Y, X, U, times_3_out_gga3(U, Y, Z)) -> if_not_divides_2_in_3_gg4(Y, X, Z, neq_2_in_gg2(X, Z))
neq_2_in_gg2(s_11(X), 0_0) -> neq_2_out_gg2(s_11(X), 0_0)
neq_2_in_gg2(0_0, s_11(X)) -> neq_2_out_gg2(0_0, s_11(X))
neq_2_in_gg2(s_11(X), s_11(Y)) -> if_neq_2_in_1_gg3(X, Y, neq_2_in_gg2(X, Y))
if_neq_2_in_1_gg3(X, Y, neq_2_out_gg2(X, Y)) -> neq_2_out_gg2(s_11(X), s_11(Y))
if_not_divides_2_in_3_gg4(Y, X, Z, neq_2_out_gg2(X, Z)) -> not_divides_2_out_gg2(Y, X)
if_pr_2_in_1_gg3(X, Y, not_divides_2_out_gg2(s_11(s_11(Y)), X)) -> if_pr_2_in_2_gg3(X, Y, pr_2_in_gg2(X, s_11(Y)))
if_pr_2_in_2_gg3(X, Y, pr_2_out_gg2(X, s_11(Y))) -> pr_2_out_gg2(X, s_11(s_11(Y)))
if_prime_1_in_1_g2(X, pr_2_out_gg2(s_11(s_11(X)), s_11(X))) -> prime_1_out_g1(s_11(s_11(X)))

The argument filtering Pi contains the following mapping:
prime_1_in_g1(x1)  =  prime_1_in_g1(x1)
0_0  =  0_0
s_11(x1)  =  s_11(x1)
if_prime_1_in_1_g2(x1, x2)  =  if_prime_1_in_1_g1(x2)
pr_2_in_gg2(x1, x2)  =  pr_2_in_gg2(x1, x2)
pr_2_out_gg2(x1, x2)  =  pr_2_out_gg
if_pr_2_in_1_gg3(x1, x2, x3)  =  if_pr_2_in_1_gg3(x1, x2, x3)
not_divides_2_in_gg2(x1, x2)  =  not_divides_2_in_gg2(x1, x2)
if_not_divides_2_in_1_gg3(x1, x2, x3)  =  if_not_divides_2_in_1_gg3(x1, x2, x3)
div_3_in_gga3(x1, x2, x3)  =  div_3_in_gga2(x1, x2)
if_div_3_in_1_gga4(x1, x2, x3, x4)  =  if_div_3_in_1_gga1(x4)
quot_4_in_ggga4(x1, x2, x3, x4)  =  quot_4_in_ggga3(x1, x2, x3)
quot_4_out_ggga4(x1, x2, x3, x4)  =  quot_4_out_ggga1(x4)
if_quot_4_in_1_ggga5(x1, x2, x3, x4, x5)  =  if_quot_4_in_1_ggga1(x5)
if_quot_4_in_2_ggga4(x1, x2, x3, x4)  =  if_quot_4_in_2_ggga1(x4)
div_3_out_gga3(x1, x2, x3)  =  div_3_out_gga1(x3)
if_not_divides_2_in_2_gg4(x1, x2, x3, x4)  =  if_not_divides_2_in_2_gg2(x2, x4)
times_3_in_gga3(x1, x2, x3)  =  times_3_in_gga2(x1, x2)
times_3_out_gga3(x1, x2, x3)  =  times_3_out_gga1(x3)
if_times_3_in_1_gga4(x1, x2, x3, x4)  =  if_times_3_in_1_gga2(x2, x4)
if_times_3_in_2_gga5(x1, x2, x3, x4, x5)  =  if_times_3_in_2_gga1(x5)
add_3_in_gga3(x1, x2, x3)  =  add_3_in_gga2(x1, x2)
add_3_out_gga3(x1, x2, x3)  =  add_3_out_gga1(x3)
if_add_3_in_1_gga4(x1, x2, x3, x4)  =  if_add_3_in_1_gga1(x4)
if_not_divides_2_in_3_gg4(x1, x2, x3, x4)  =  if_not_divides_2_in_3_gg1(x4)
neq_2_in_gg2(x1, x2)  =  neq_2_in_gg2(x1, x2)
neq_2_out_gg2(x1, x2)  =  neq_2_out_gg
if_neq_2_in_1_gg3(x1, x2, x3)  =  if_neq_2_in_1_gg1(x3)
not_divides_2_out_gg2(x1, x2)  =  not_divides_2_out_gg
if_pr_2_in_2_gg3(x1, x2, x3)  =  if_pr_2_in_2_gg1(x3)
prime_1_out_g1(x1)  =  prime_1_out_g
TIMES_3_IN_GGA3(x1, x2, x3)  =  TIMES_3_IN_GGA2(x1, x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting we can delete all non-usable rules from R.

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

TIMES_3_IN_GGA3(s_11(X), Y, Z) -> TIMES_3_IN_GGA3(X, Y, U)

R is empty.
The argument filtering Pi contains the following mapping:
s_11(x1)  =  s_11(x1)
TIMES_3_IN_GGA3(x1, x2, x3)  =  TIMES_3_IN_GGA2(x1, x2)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem into ordinary QDP problem by application of Pi.

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

TIMES_3_IN_GGA2(s_11(X), Y) -> TIMES_3_IN_GGA2(X, Y)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
The head symbols of this DP problem are {TIMES_3_IN_GGA2}.
By using the subterm criterion together with the size-change analysis we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

QUOT_4_IN_GGGA4(X, 0_0, s_11(Z), s_11(U)) -> QUOT_4_IN_GGGA4(X, s_11(Z), s_11(Z), U)
QUOT_4_IN_GGGA4(s_11(X), s_11(Y), Z, U) -> QUOT_4_IN_GGGA4(X, Y, Z, U)

The TRS R consists of the following rules:

prime_1_in_g1(s_11(s_11(X))) -> if_prime_1_in_1_g2(X, pr_2_in_gg2(s_11(s_11(X)), s_11(X)))
pr_2_in_gg2(X, s_11(0_0)) -> pr_2_out_gg2(X, s_11(0_0))
pr_2_in_gg2(X, s_11(s_11(Y))) -> if_pr_2_in_1_gg3(X, Y, not_divides_2_in_gg2(s_11(s_11(Y)), X))
not_divides_2_in_gg2(Y, X) -> if_not_divides_2_in_1_gg3(Y, X, div_3_in_gga3(X, Y, U))
div_3_in_gga3(X, Y, Z) -> if_div_3_in_1_gga4(X, Y, Z, quot_4_in_ggga4(X, Y, Y, Z))
quot_4_in_ggga4(0_0, s_11(Y), s_11(Z), 0_0) -> quot_4_out_ggga4(0_0, s_11(Y), s_11(Z), 0_0)
quot_4_in_ggga4(s_11(X), s_11(Y), Z, U) -> if_quot_4_in_1_ggga5(X, Y, Z, U, quot_4_in_ggga4(X, Y, Z, U))
quot_4_in_ggga4(X, 0_0, s_11(Z), s_11(U)) -> if_quot_4_in_2_ggga4(X, Z, U, quot_4_in_ggga4(X, s_11(Z), s_11(Z), U))
if_quot_4_in_2_ggga4(X, Z, U, quot_4_out_ggga4(X, s_11(Z), s_11(Z), U)) -> quot_4_out_ggga4(X, 0_0, s_11(Z), s_11(U))
if_quot_4_in_1_ggga5(X, Y, Z, U, quot_4_out_ggga4(X, Y, Z, U)) -> quot_4_out_ggga4(s_11(X), s_11(Y), Z, U)
if_div_3_in_1_gga4(X, Y, Z, quot_4_out_ggga4(X, Y, Y, Z)) -> div_3_out_gga3(X, Y, Z)
if_not_divides_2_in_1_gg3(Y, X, div_3_out_gga3(X, Y, U)) -> if_not_divides_2_in_2_gg4(Y, X, U, times_3_in_gga3(U, Y, Z))
times_3_in_gga3(0_0, Y, 0_0) -> times_3_out_gga3(0_0, Y, 0_0)
times_3_in_gga3(s_11(X), Y, Z) -> if_times_3_in_1_gga4(X, Y, Z, times_3_in_gga3(X, Y, U))
if_times_3_in_1_gga4(X, Y, Z, times_3_out_gga3(X, Y, U)) -> if_times_3_in_2_gga5(X, Y, Z, U, add_3_in_gga3(U, Y, Z))
add_3_in_gga3(X, 0_0, X) -> add_3_out_gga3(X, 0_0, X)
add_3_in_gga3(0_0, X, X) -> add_3_out_gga3(0_0, X, X)
add_3_in_gga3(s_11(X), Y, s_11(Z)) -> if_add_3_in_1_gga4(X, Y, Z, add_3_in_gga3(X, Y, Z))
if_add_3_in_1_gga4(X, Y, Z, add_3_out_gga3(X, Y, Z)) -> add_3_out_gga3(s_11(X), Y, s_11(Z))
if_times_3_in_2_gga5(X, Y, Z, U, add_3_out_gga3(U, Y, Z)) -> times_3_out_gga3(s_11(X), Y, Z)
if_not_divides_2_in_2_gg4(Y, X, U, times_3_out_gga3(U, Y, Z)) -> if_not_divides_2_in_3_gg4(Y, X, Z, neq_2_in_gg2(X, Z))
neq_2_in_gg2(s_11(X), 0_0) -> neq_2_out_gg2(s_11(X), 0_0)
neq_2_in_gg2(0_0, s_11(X)) -> neq_2_out_gg2(0_0, s_11(X))
neq_2_in_gg2(s_11(X), s_11(Y)) -> if_neq_2_in_1_gg3(X, Y, neq_2_in_gg2(X, Y))
if_neq_2_in_1_gg3(X, Y, neq_2_out_gg2(X, Y)) -> neq_2_out_gg2(s_11(X), s_11(Y))
if_not_divides_2_in_3_gg4(Y, X, Z, neq_2_out_gg2(X, Z)) -> not_divides_2_out_gg2(Y, X)
if_pr_2_in_1_gg3(X, Y, not_divides_2_out_gg2(s_11(s_11(Y)), X)) -> if_pr_2_in_2_gg3(X, Y, pr_2_in_gg2(X, s_11(Y)))
if_pr_2_in_2_gg3(X, Y, pr_2_out_gg2(X, s_11(Y))) -> pr_2_out_gg2(X, s_11(s_11(Y)))
if_prime_1_in_1_g2(X, pr_2_out_gg2(s_11(s_11(X)), s_11(X))) -> prime_1_out_g1(s_11(s_11(X)))

The argument filtering Pi contains the following mapping:
prime_1_in_g1(x1)  =  prime_1_in_g1(x1)
0_0  =  0_0
s_11(x1)  =  s_11(x1)
if_prime_1_in_1_g2(x1, x2)  =  if_prime_1_in_1_g1(x2)
pr_2_in_gg2(x1, x2)  =  pr_2_in_gg2(x1, x2)
pr_2_out_gg2(x1, x2)  =  pr_2_out_gg
if_pr_2_in_1_gg3(x1, x2, x3)  =  if_pr_2_in_1_gg3(x1, x2, x3)
not_divides_2_in_gg2(x1, x2)  =  not_divides_2_in_gg2(x1, x2)
if_not_divides_2_in_1_gg3(x1, x2, x3)  =  if_not_divides_2_in_1_gg3(x1, x2, x3)
div_3_in_gga3(x1, x2, x3)  =  div_3_in_gga2(x1, x2)
if_div_3_in_1_gga4(x1, x2, x3, x4)  =  if_div_3_in_1_gga1(x4)
quot_4_in_ggga4(x1, x2, x3, x4)  =  quot_4_in_ggga3(x1, x2, x3)
quot_4_out_ggga4(x1, x2, x3, x4)  =  quot_4_out_ggga1(x4)
if_quot_4_in_1_ggga5(x1, x2, x3, x4, x5)  =  if_quot_4_in_1_ggga1(x5)
if_quot_4_in_2_ggga4(x1, x2, x3, x4)  =  if_quot_4_in_2_ggga1(x4)
div_3_out_gga3(x1, x2, x3)  =  div_3_out_gga1(x3)
if_not_divides_2_in_2_gg4(x1, x2, x3, x4)  =  if_not_divides_2_in_2_gg2(x2, x4)
times_3_in_gga3(x1, x2, x3)  =  times_3_in_gga2(x1, x2)
times_3_out_gga3(x1, x2, x3)  =  times_3_out_gga1(x3)
if_times_3_in_1_gga4(x1, x2, x3, x4)  =  if_times_3_in_1_gga2(x2, x4)
if_times_3_in_2_gga5(x1, x2, x3, x4, x5)  =  if_times_3_in_2_gga1(x5)
add_3_in_gga3(x1, x2, x3)  =  add_3_in_gga2(x1, x2)
add_3_out_gga3(x1, x2, x3)  =  add_3_out_gga1(x3)
if_add_3_in_1_gga4(x1, x2, x3, x4)  =  if_add_3_in_1_gga1(x4)
if_not_divides_2_in_3_gg4(x1, x2, x3, x4)  =  if_not_divides_2_in_3_gg1(x4)
neq_2_in_gg2(x1, x2)  =  neq_2_in_gg2(x1, x2)
neq_2_out_gg2(x1, x2)  =  neq_2_out_gg
if_neq_2_in_1_gg3(x1, x2, x3)  =  if_neq_2_in_1_gg1(x3)
not_divides_2_out_gg2(x1, x2)  =  not_divides_2_out_gg
if_pr_2_in_2_gg3(x1, x2, x3)  =  if_pr_2_in_2_gg1(x3)
prime_1_out_g1(x1)  =  prime_1_out_g
QUOT_4_IN_GGGA4(x1, x2, x3, x4)  =  QUOT_4_IN_GGGA3(x1, x2, x3)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting we can delete all non-usable rules from R.

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

QUOT_4_IN_GGGA4(X, 0_0, s_11(Z), s_11(U)) -> QUOT_4_IN_GGGA4(X, s_11(Z), s_11(Z), U)
QUOT_4_IN_GGGA4(s_11(X), s_11(Y), Z, U) -> QUOT_4_IN_GGGA4(X, Y, Z, U)

R is empty.
The argument filtering Pi contains the following mapping:
0_0  =  0_0
s_11(x1)  =  s_11(x1)
QUOT_4_IN_GGGA4(x1, x2, x3, x4)  =  QUOT_4_IN_GGGA3(x1, x2, x3)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem into ordinary QDP problem by application of Pi.

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

QUOT_4_IN_GGGA3(X, 0_0, s_11(Z)) -> QUOT_4_IN_GGGA3(X, s_11(Z), s_11(Z))
QUOT_4_IN_GGGA3(s_11(X), s_11(Y), Z) -> QUOT_4_IN_GGGA3(X, Y, Z)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
The head symbols of this DP problem are {QUOT_4_IN_GGGA3}.
By using the subterm criterion together with the size-change analysis we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof

Pi DP problem:
The TRS P consists of the following rules:

IF_PR_2_IN_1_GG3(X, Y, not_divides_2_out_gg2(s_11(s_11(Y)), X)) -> PR_2_IN_GG2(X, s_11(Y))
PR_2_IN_GG2(X, s_11(s_11(Y))) -> IF_PR_2_IN_1_GG3(X, Y, not_divides_2_in_gg2(s_11(s_11(Y)), X))

The TRS R consists of the following rules:

prime_1_in_g1(s_11(s_11(X))) -> if_prime_1_in_1_g2(X, pr_2_in_gg2(s_11(s_11(X)), s_11(X)))
pr_2_in_gg2(X, s_11(0_0)) -> pr_2_out_gg2(X, s_11(0_0))
pr_2_in_gg2(X, s_11(s_11(Y))) -> if_pr_2_in_1_gg3(X, Y, not_divides_2_in_gg2(s_11(s_11(Y)), X))
not_divides_2_in_gg2(Y, X) -> if_not_divides_2_in_1_gg3(Y, X, div_3_in_gga3(X, Y, U))
div_3_in_gga3(X, Y, Z) -> if_div_3_in_1_gga4(X, Y, Z, quot_4_in_ggga4(X, Y, Y, Z))
quot_4_in_ggga4(0_0, s_11(Y), s_11(Z), 0_0) -> quot_4_out_ggga4(0_0, s_11(Y), s_11(Z), 0_0)
quot_4_in_ggga4(s_11(X), s_11(Y), Z, U) -> if_quot_4_in_1_ggga5(X, Y, Z, U, quot_4_in_ggga4(X, Y, Z, U))
quot_4_in_ggga4(X, 0_0, s_11(Z), s_11(U)) -> if_quot_4_in_2_ggga4(X, Z, U, quot_4_in_ggga4(X, s_11(Z), s_11(Z), U))
if_quot_4_in_2_ggga4(X, Z, U, quot_4_out_ggga4(X, s_11(Z), s_11(Z), U)) -> quot_4_out_ggga4(X, 0_0, s_11(Z), s_11(U))
if_quot_4_in_1_ggga5(X, Y, Z, U, quot_4_out_ggga4(X, Y, Z, U)) -> quot_4_out_ggga4(s_11(X), s_11(Y), Z, U)
if_div_3_in_1_gga4(X, Y, Z, quot_4_out_ggga4(X, Y, Y, Z)) -> div_3_out_gga3(X, Y, Z)
if_not_divides_2_in_1_gg3(Y, X, div_3_out_gga3(X, Y, U)) -> if_not_divides_2_in_2_gg4(Y, X, U, times_3_in_gga3(U, Y, Z))
times_3_in_gga3(0_0, Y, 0_0) -> times_3_out_gga3(0_0, Y, 0_0)
times_3_in_gga3(s_11(X), Y, Z) -> if_times_3_in_1_gga4(X, Y, Z, times_3_in_gga3(X, Y, U))
if_times_3_in_1_gga4(X, Y, Z, times_3_out_gga3(X, Y, U)) -> if_times_3_in_2_gga5(X, Y, Z, U, add_3_in_gga3(U, Y, Z))
add_3_in_gga3(X, 0_0, X) -> add_3_out_gga3(X, 0_0, X)
add_3_in_gga3(0_0, X, X) -> add_3_out_gga3(0_0, X, X)
add_3_in_gga3(s_11(X), Y, s_11(Z)) -> if_add_3_in_1_gga4(X, Y, Z, add_3_in_gga3(X, Y, Z))
if_add_3_in_1_gga4(X, Y, Z, add_3_out_gga3(X, Y, Z)) -> add_3_out_gga3(s_11(X), Y, s_11(Z))
if_times_3_in_2_gga5(X, Y, Z, U, add_3_out_gga3(U, Y, Z)) -> times_3_out_gga3(s_11(X), Y, Z)
if_not_divides_2_in_2_gg4(Y, X, U, times_3_out_gga3(U, Y, Z)) -> if_not_divides_2_in_3_gg4(Y, X, Z, neq_2_in_gg2(X, Z))
neq_2_in_gg2(s_11(X), 0_0) -> neq_2_out_gg2(s_11(X), 0_0)
neq_2_in_gg2(0_0, s_11(X)) -> neq_2_out_gg2(0_0, s_11(X))
neq_2_in_gg2(s_11(X), s_11(Y)) -> if_neq_2_in_1_gg3(X, Y, neq_2_in_gg2(X, Y))
if_neq_2_in_1_gg3(X, Y, neq_2_out_gg2(X, Y)) -> neq_2_out_gg2(s_11(X), s_11(Y))
if_not_divides_2_in_3_gg4(Y, X, Z, neq_2_out_gg2(X, Z)) -> not_divides_2_out_gg2(Y, X)
if_pr_2_in_1_gg3(X, Y, not_divides_2_out_gg2(s_11(s_11(Y)), X)) -> if_pr_2_in_2_gg3(X, Y, pr_2_in_gg2(X, s_11(Y)))
if_pr_2_in_2_gg3(X, Y, pr_2_out_gg2(X, s_11(Y))) -> pr_2_out_gg2(X, s_11(s_11(Y)))
if_prime_1_in_1_g2(X, pr_2_out_gg2(s_11(s_11(X)), s_11(X))) -> prime_1_out_g1(s_11(s_11(X)))

The argument filtering Pi contains the following mapping:
prime_1_in_g1(x1)  =  prime_1_in_g1(x1)
0_0  =  0_0
s_11(x1)  =  s_11(x1)
if_prime_1_in_1_g2(x1, x2)  =  if_prime_1_in_1_g1(x2)
pr_2_in_gg2(x1, x2)  =  pr_2_in_gg2(x1, x2)
pr_2_out_gg2(x1, x2)  =  pr_2_out_gg
if_pr_2_in_1_gg3(x1, x2, x3)  =  if_pr_2_in_1_gg3(x1, x2, x3)
not_divides_2_in_gg2(x1, x2)  =  not_divides_2_in_gg2(x1, x2)
if_not_divides_2_in_1_gg3(x1, x2, x3)  =  if_not_divides_2_in_1_gg3(x1, x2, x3)
div_3_in_gga3(x1, x2, x3)  =  div_3_in_gga2(x1, x2)
if_div_3_in_1_gga4(x1, x2, x3, x4)  =  if_div_3_in_1_gga1(x4)
quot_4_in_ggga4(x1, x2, x3, x4)  =  quot_4_in_ggga3(x1, x2, x3)
quot_4_out_ggga4(x1, x2, x3, x4)  =  quot_4_out_ggga1(x4)
if_quot_4_in_1_ggga5(x1, x2, x3, x4, x5)  =  if_quot_4_in_1_ggga1(x5)
if_quot_4_in_2_ggga4(x1, x2, x3, x4)  =  if_quot_4_in_2_ggga1(x4)
div_3_out_gga3(x1, x2, x3)  =  div_3_out_gga1(x3)
if_not_divides_2_in_2_gg4(x1, x2, x3, x4)  =  if_not_divides_2_in_2_gg2(x2, x4)
times_3_in_gga3(x1, x2, x3)  =  times_3_in_gga2(x1, x2)
times_3_out_gga3(x1, x2, x3)  =  times_3_out_gga1(x3)
if_times_3_in_1_gga4(x1, x2, x3, x4)  =  if_times_3_in_1_gga2(x2, x4)
if_times_3_in_2_gga5(x1, x2, x3, x4, x5)  =  if_times_3_in_2_gga1(x5)
add_3_in_gga3(x1, x2, x3)  =  add_3_in_gga2(x1, x2)
add_3_out_gga3(x1, x2, x3)  =  add_3_out_gga1(x3)
if_add_3_in_1_gga4(x1, x2, x3, x4)  =  if_add_3_in_1_gga1(x4)
if_not_divides_2_in_3_gg4(x1, x2, x3, x4)  =  if_not_divides_2_in_3_gg1(x4)
neq_2_in_gg2(x1, x2)  =  neq_2_in_gg2(x1, x2)
neq_2_out_gg2(x1, x2)  =  neq_2_out_gg
if_neq_2_in_1_gg3(x1, x2, x3)  =  if_neq_2_in_1_gg1(x3)
not_divides_2_out_gg2(x1, x2)  =  not_divides_2_out_gg
if_pr_2_in_2_gg3(x1, x2, x3)  =  if_pr_2_in_2_gg1(x3)
prime_1_out_g1(x1)  =  prime_1_out_g
PR_2_IN_GG2(x1, x2)  =  PR_2_IN_GG2(x1, x2)
IF_PR_2_IN_1_GG3(x1, x2, x3)  =  IF_PR_2_IN_1_GG3(x1, x2, x3)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting we can delete all non-usable rules from R.

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof

Pi DP problem:
The TRS P consists of the following rules:

IF_PR_2_IN_1_GG3(X, Y, not_divides_2_out_gg2(s_11(s_11(Y)), X)) -> PR_2_IN_GG2(X, s_11(Y))
PR_2_IN_GG2(X, s_11(s_11(Y))) -> IF_PR_2_IN_1_GG3(X, Y, not_divides_2_in_gg2(s_11(s_11(Y)), X))

The TRS R consists of the following rules:

not_divides_2_in_gg2(Y, X) -> if_not_divides_2_in_1_gg3(Y, X, div_3_in_gga3(X, Y, U))
if_not_divides_2_in_1_gg3(Y, X, div_3_out_gga3(X, Y, U)) -> if_not_divides_2_in_2_gg4(Y, X, U, times_3_in_gga3(U, Y, Z))
div_3_in_gga3(X, Y, Z) -> if_div_3_in_1_gga4(X, Y, Z, quot_4_in_ggga4(X, Y, Y, Z))
if_not_divides_2_in_2_gg4(Y, X, U, times_3_out_gga3(U, Y, Z)) -> if_not_divides_2_in_3_gg4(Y, X, Z, neq_2_in_gg2(X, Z))
if_div_3_in_1_gga4(X, Y, Z, quot_4_out_ggga4(X, Y, Y, Z)) -> div_3_out_gga3(X, Y, Z)
times_3_in_gga3(0_0, Y, 0_0) -> times_3_out_gga3(0_0, Y, 0_0)
times_3_in_gga3(s_11(X), Y, Z) -> if_times_3_in_1_gga4(X, Y, Z, times_3_in_gga3(X, Y, U))
if_not_divides_2_in_3_gg4(Y, X, Z, neq_2_out_gg2(X, Z)) -> not_divides_2_out_gg2(Y, X)
quot_4_in_ggga4(0_0, s_11(Y), s_11(Z), 0_0) -> quot_4_out_ggga4(0_0, s_11(Y), s_11(Z), 0_0)
quot_4_in_ggga4(s_11(X), s_11(Y), Z, U) -> if_quot_4_in_1_ggga5(X, Y, Z, U, quot_4_in_ggga4(X, Y, Z, U))
quot_4_in_ggga4(X, 0_0, s_11(Z), s_11(U)) -> if_quot_4_in_2_ggga4(X, Z, U, quot_4_in_ggga4(X, s_11(Z), s_11(Z), U))
if_times_3_in_1_gga4(X, Y, Z, times_3_out_gga3(X, Y, U)) -> if_times_3_in_2_gga5(X, Y, Z, U, add_3_in_gga3(U, Y, Z))
neq_2_in_gg2(s_11(X), 0_0) -> neq_2_out_gg2(s_11(X), 0_0)
neq_2_in_gg2(0_0, s_11(X)) -> neq_2_out_gg2(0_0, s_11(X))
neq_2_in_gg2(s_11(X), s_11(Y)) -> if_neq_2_in_1_gg3(X, Y, neq_2_in_gg2(X, Y))
if_quot_4_in_1_ggga5(X, Y, Z, U, quot_4_out_ggga4(X, Y, Z, U)) -> quot_4_out_ggga4(s_11(X), s_11(Y), Z, U)
if_quot_4_in_2_ggga4(X, Z, U, quot_4_out_ggga4(X, s_11(Z), s_11(Z), U)) -> quot_4_out_ggga4(X, 0_0, s_11(Z), s_11(U))
if_times_3_in_2_gga5(X, Y, Z, U, add_3_out_gga3(U, Y, Z)) -> times_3_out_gga3(s_11(X), Y, Z)
if_neq_2_in_1_gg3(X, Y, neq_2_out_gg2(X, Y)) -> neq_2_out_gg2(s_11(X), s_11(Y))
add_3_in_gga3(X, 0_0, X) -> add_3_out_gga3(X, 0_0, X)
add_3_in_gga3(0_0, X, X) -> add_3_out_gga3(0_0, X, X)
add_3_in_gga3(s_11(X), Y, s_11(Z)) -> if_add_3_in_1_gga4(X, Y, Z, add_3_in_gga3(X, Y, Z))
if_add_3_in_1_gga4(X, Y, Z, add_3_out_gga3(X, Y, Z)) -> add_3_out_gga3(s_11(X), Y, s_11(Z))

The argument filtering Pi contains the following mapping:
0_0  =  0_0
s_11(x1)  =  s_11(x1)
not_divides_2_in_gg2(x1, x2)  =  not_divides_2_in_gg2(x1, x2)
if_not_divides_2_in_1_gg3(x1, x2, x3)  =  if_not_divides_2_in_1_gg3(x1, x2, x3)
div_3_in_gga3(x1, x2, x3)  =  div_3_in_gga2(x1, x2)
if_div_3_in_1_gga4(x1, x2, x3, x4)  =  if_div_3_in_1_gga1(x4)
quot_4_in_ggga4(x1, x2, x3, x4)  =  quot_4_in_ggga3(x1, x2, x3)
quot_4_out_ggga4(x1, x2, x3, x4)  =  quot_4_out_ggga1(x4)
if_quot_4_in_1_ggga5(x1, x2, x3, x4, x5)  =  if_quot_4_in_1_ggga1(x5)
if_quot_4_in_2_ggga4(x1, x2, x3, x4)  =  if_quot_4_in_2_ggga1(x4)
div_3_out_gga3(x1, x2, x3)  =  div_3_out_gga1(x3)
if_not_divides_2_in_2_gg4(x1, x2, x3, x4)  =  if_not_divides_2_in_2_gg2(x2, x4)
times_3_in_gga3(x1, x2, x3)  =  times_3_in_gga2(x1, x2)
times_3_out_gga3(x1, x2, x3)  =  times_3_out_gga1(x3)
if_times_3_in_1_gga4(x1, x2, x3, x4)  =  if_times_3_in_1_gga2(x2, x4)
if_times_3_in_2_gga5(x1, x2, x3, x4, x5)  =  if_times_3_in_2_gga1(x5)
add_3_in_gga3(x1, x2, x3)  =  add_3_in_gga2(x1, x2)
add_3_out_gga3(x1, x2, x3)  =  add_3_out_gga1(x3)
if_add_3_in_1_gga4(x1, x2, x3, x4)  =  if_add_3_in_1_gga1(x4)
if_not_divides_2_in_3_gg4(x1, x2, x3, x4)  =  if_not_divides_2_in_3_gg1(x4)
neq_2_in_gg2(x1, x2)  =  neq_2_in_gg2(x1, x2)
neq_2_out_gg2(x1, x2)  =  neq_2_out_gg
if_neq_2_in_1_gg3(x1, x2, x3)  =  if_neq_2_in_1_gg1(x3)
not_divides_2_out_gg2(x1, x2)  =  not_divides_2_out_gg
PR_2_IN_GG2(x1, x2)  =  PR_2_IN_GG2(x1, x2)
IF_PR_2_IN_1_GG3(x1, x2, x3)  =  IF_PR_2_IN_1_GG3(x1, x2, x3)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem into ordinary QDP problem by application of Pi.

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPPoloProof

Q DP problem:
The TRS P consists of the following rules:

IF_PR_2_IN_1_GG3(X, Y, not_divides_2_out_gg) -> PR_2_IN_GG2(X, s_11(Y))
PR_2_IN_GG2(X, s_11(s_11(Y))) -> IF_PR_2_IN_1_GG3(X, Y, not_divides_2_in_gg2(s_11(s_11(Y)), X))

The TRS R consists of the following rules:

not_divides_2_in_gg2(Y, X) -> if_not_divides_2_in_1_gg3(Y, X, div_3_in_gga2(X, Y))
if_not_divides_2_in_1_gg3(Y, X, div_3_out_gga1(U)) -> if_not_divides_2_in_2_gg2(X, times_3_in_gga2(U, Y))
div_3_in_gga2(X, Y) -> if_div_3_in_1_gga1(quot_4_in_ggga3(X, Y, Y))
if_not_divides_2_in_2_gg2(X, times_3_out_gga1(Z)) -> if_not_divides_2_in_3_gg1(neq_2_in_gg2(X, Z))
if_div_3_in_1_gga1(quot_4_out_ggga1(Z)) -> div_3_out_gga1(Z)
times_3_in_gga2(0_0, Y) -> times_3_out_gga1(0_0)
times_3_in_gga2(s_11(X), Y) -> if_times_3_in_1_gga2(Y, times_3_in_gga2(X, Y))
if_not_divides_2_in_3_gg1(neq_2_out_gg) -> not_divides_2_out_gg
quot_4_in_ggga3(0_0, s_11(Y), s_11(Z)) -> quot_4_out_ggga1(0_0)
quot_4_in_ggga3(s_11(X), s_11(Y), Z) -> if_quot_4_in_1_ggga1(quot_4_in_ggga3(X, Y, Z))
quot_4_in_ggga3(X, 0_0, s_11(Z)) -> if_quot_4_in_2_ggga1(quot_4_in_ggga3(X, s_11(Z), s_11(Z)))
if_times_3_in_1_gga2(Y, times_3_out_gga1(U)) -> if_times_3_in_2_gga1(add_3_in_gga2(U, Y))
neq_2_in_gg2(s_11(X), 0_0) -> neq_2_out_gg
neq_2_in_gg2(0_0, s_11(X)) -> neq_2_out_gg
neq_2_in_gg2(s_11(X), s_11(Y)) -> if_neq_2_in_1_gg1(neq_2_in_gg2(X, Y))
if_quot_4_in_1_ggga1(quot_4_out_ggga1(U)) -> quot_4_out_ggga1(U)
if_quot_4_in_2_ggga1(quot_4_out_ggga1(U)) -> quot_4_out_ggga1(s_11(U))
if_times_3_in_2_gga1(add_3_out_gga1(Z)) -> times_3_out_gga1(Z)
if_neq_2_in_1_gg1(neq_2_out_gg) -> neq_2_out_gg
add_3_in_gga2(X, 0_0) -> add_3_out_gga1(X)
add_3_in_gga2(0_0, X) -> add_3_out_gga1(X)
add_3_in_gga2(s_11(X), Y) -> if_add_3_in_1_gga1(add_3_in_gga2(X, Y))
if_add_3_in_1_gga1(add_3_out_gga1(Z)) -> add_3_out_gga1(s_11(Z))

The set Q consists of the following terms:

not_divides_2_in_gg2(x0, x1)
if_not_divides_2_in_1_gg3(x0, x1, x2)
div_3_in_gga2(x0, x1)
if_not_divides_2_in_2_gg2(x0, x1)
if_div_3_in_1_gga1(x0)
times_3_in_gga2(x0, x1)
if_not_divides_2_in_3_gg1(x0)
quot_4_in_ggga3(x0, x1, x2)
if_times_3_in_1_gga2(x0, x1)
neq_2_in_gg2(x0, x1)
if_quot_4_in_1_ggga1(x0)
if_quot_4_in_2_ggga1(x0)
if_times_3_in_2_gga1(x0)
if_neq_2_in_1_gg1(x0)
add_3_in_gga2(x0, x1)
if_add_3_in_1_gga1(x0)

We have to consider all (P,Q,R)-chains.
The head symbols of this DP problem are {PR_2_IN_GG2, IF_PR_2_IN_1_GG3}.
By using a polynomial ordering, the following set of Dependency Pairs of this DP problem can be strictly oriented.

PR_2_IN_GG2(X, s_11(s_11(Y))) -> IF_PR_2_IN_1_GG3(X, Y, not_divides_2_in_gg2(s_11(s_11(Y)), X))
The remaining Dependency Pairs were at least non-strictly be oriented.

IF_PR_2_IN_1_GG3(X, Y, not_divides_2_out_gg) -> PR_2_IN_GG2(X, s_11(Y))
With the implicit AFS there is no usable rule.

Used ordering: POLO with Polynomial interpretation:


POL(0_0) = 0   
POL(if_quot_4_in_1_ggga1(x1)) = 0   
POL(div_3_in_gga2(x1, x2)) = 0   
POL(not_divides_2_in_gg2(x1, x2)) = 0   
POL(not_divides_2_out_gg) = 0   
POL(if_not_divides_2_in_2_gg2(x1, x2)) = 0   
POL(neq_2_in_gg2(x1, x2)) = 0   
POL(add_3_in_gga2(x1, x2)) = 0   
POL(if_div_3_in_1_gga1(x1)) = 0   
POL(div_3_out_gga1(x1)) = 0   
POL(if_neq_2_in_1_gg1(x1)) = 0   
POL(PR_2_IN_GG2(x1, x2)) = x2   
POL(if_times_3_in_1_gga2(x1, x2)) = 0   
POL(if_add_3_in_1_gga1(x1)) = 0   
POL(add_3_out_gga1(x1)) = 0   
POL(IF_PR_2_IN_1_GG3(x1, x2, x3)) = 1 + x2   
POL(quot_4_in_ggga3(x1, x2, x3)) = 0   
POL(quot_4_out_ggga1(x1)) = 0   
POL(times_3_out_gga1(x1)) = 0   
POL(if_not_divides_2_in_1_gg3(x1, x2, x3)) = 0   
POL(if_quot_4_in_2_ggga1(x1)) = 0   
POL(if_times_3_in_2_gga1(x1)) = 0   
POL(times_3_in_gga2(x1, x2)) = 0   
POL(s_11(x1)) = 1 + x1   
POL(neq_2_out_gg) = 0   
POL(if_not_divides_2_in_3_gg1(x1)) = 0   



↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ QDPPoloProof
QDP
                            ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

IF_PR_2_IN_1_GG3(X, Y, not_divides_2_out_gg) -> PR_2_IN_GG2(X, s_11(Y))

The TRS R consists of the following rules:

not_divides_2_in_gg2(Y, X) -> if_not_divides_2_in_1_gg3(Y, X, div_3_in_gga2(X, Y))
if_not_divides_2_in_1_gg3(Y, X, div_3_out_gga1(U)) -> if_not_divides_2_in_2_gg2(X, times_3_in_gga2(U, Y))
div_3_in_gga2(X, Y) -> if_div_3_in_1_gga1(quot_4_in_ggga3(X, Y, Y))
if_not_divides_2_in_2_gg2(X, times_3_out_gga1(Z)) -> if_not_divides_2_in_3_gg1(neq_2_in_gg2(X, Z))
if_div_3_in_1_gga1(quot_4_out_ggga1(Z)) -> div_3_out_gga1(Z)
times_3_in_gga2(0_0, Y) -> times_3_out_gga1(0_0)
times_3_in_gga2(s_11(X), Y) -> if_times_3_in_1_gga2(Y, times_3_in_gga2(X, Y))
if_not_divides_2_in_3_gg1(neq_2_out_gg) -> not_divides_2_out_gg
quot_4_in_ggga3(0_0, s_11(Y), s_11(Z)) -> quot_4_out_ggga1(0_0)
quot_4_in_ggga3(s_11(X), s_11(Y), Z) -> if_quot_4_in_1_ggga1(quot_4_in_ggga3(X, Y, Z))
quot_4_in_ggga3(X, 0_0, s_11(Z)) -> if_quot_4_in_2_ggga1(quot_4_in_ggga3(X, s_11(Z), s_11(Z)))
if_times_3_in_1_gga2(Y, times_3_out_gga1(U)) -> if_times_3_in_2_gga1(add_3_in_gga2(U, Y))
neq_2_in_gg2(s_11(X), 0_0) -> neq_2_out_gg
neq_2_in_gg2(0_0, s_11(X)) -> neq_2_out_gg
neq_2_in_gg2(s_11(X), s_11(Y)) -> if_neq_2_in_1_gg1(neq_2_in_gg2(X, Y))
if_quot_4_in_1_ggga1(quot_4_out_ggga1(U)) -> quot_4_out_ggga1(U)
if_quot_4_in_2_ggga1(quot_4_out_ggga1(U)) -> quot_4_out_ggga1(s_11(U))
if_times_3_in_2_gga1(add_3_out_gga1(Z)) -> times_3_out_gga1(Z)
if_neq_2_in_1_gg1(neq_2_out_gg) -> neq_2_out_gg
add_3_in_gga2(X, 0_0) -> add_3_out_gga1(X)
add_3_in_gga2(0_0, X) -> add_3_out_gga1(X)
add_3_in_gga2(s_11(X), Y) -> if_add_3_in_1_gga1(add_3_in_gga2(X, Y))
if_add_3_in_1_gga1(add_3_out_gga1(Z)) -> add_3_out_gga1(s_11(Z))

The set Q consists of the following terms:

not_divides_2_in_gg2(x0, x1)
if_not_divides_2_in_1_gg3(x0, x1, x2)
div_3_in_gga2(x0, x1)
if_not_divides_2_in_2_gg2(x0, x1)
if_div_3_in_1_gga1(x0)
times_3_in_gga2(x0, x1)
if_not_divides_2_in_3_gg1(x0)
quot_4_in_ggga3(x0, x1, x2)
if_times_3_in_1_gga2(x0, x1)
neq_2_in_gg2(x0, x1)
if_quot_4_in_1_ggga1(x0)
if_quot_4_in_2_ggga1(x0)
if_times_3_in_2_gga1(x0)
if_neq_2_in_1_gg1(x0)
add_3_in_gga2(x0, x1)
if_add_3_in_1_gga1(x0)

We have to consider all (P,Q,R)-chains.
The head symbols of this DP problem are {PR_2_IN_GG2, IF_PR_2_IN_1_GG3}.
The approximation of the Dependency Graph contains 0 SCCs with 1 less node.